DingCustomer.php 665 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace addons\qingdongams\model;
  3. use think\Model;
  4. use traits\model\SoftDelete;
  5. /**
  6. *钉钉客户同步表
  7. */
  8. class DingCustomer Extends Model {
  9. use SoftDelete;
  10. // 表名,不含前缀
  11. protected $name = 'qingdongams_ding_customer';
  12. // 开启自动写入时间戳字段
  13. protected $autoWriteTimestamp = 'int';
  14. // 定义时间戳字段名
  15. protected $createTime = 'createtime';
  16. protected $updateTime = 'updatetime';
  17. protected $deleteTime = 'deletetime';
  18. //负责人
  19. public function ownerstaff(){
  20. return $this->belongsTo('DingStaff', 'owner_staff_id','user_id', [], 'LEFT')->setEagerlyType(0);
  21. }
  22. }