123456789101112131415161718192021222324252627282930 |
- <?php
- namespace addons\qingdongams\model;
- use addons\qingdongams\model\Product;
- use addons\qingdongams\model\ProductPart;
- use think\Model;
- /**
- *合同业绩分成
- */
- class ContractRatio extends Model
- {
- // 表名,不含前缀
- protected $name = 'qingdongams_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');
- }
- }
|