You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
664 B
30 lines
664 B
<?php
|
|
|
|
namespace addons\qingdong\model;
|
|
|
|
use addons\qingdong\model\Product;
|
|
use addons\qingdong\model\ProductPart;
|
|
use think\Model;
|
|
|
|
/**
|
|
*合同业绩分成
|
|
*/
|
|
class ContractRatio extends Model
|
|
{
|
|
// 表名,不含前缀
|
|
protected $name = 'qingdong_contract_ratio';
|
|
// 开启自动写入时间戳字段
|
|
protected $autoWriteTimestamp = false;
|
|
|
|
/**
|
|
* 合同
|
|
*/
|
|
public function contract(){
|
|
return $this->belongsTo(Contract::class,'contract_id','id')->setEagerlyType(0);
|
|
}
|
|
|
|
//
|
|
public function staff() {
|
|
return $this->hasOne(Staff::class, 'id', 'staff_id')->field('id,name,img,department_id,post');
|
|
}
|
|
}
|
|
|