DingStaff.php 636 B

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