StaffTeamList.php 618 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace addons\qingdongams\model;
  3. use think\Model;
  4. use traits\model\SoftDelete;
  5. /**
  6. * 团队 成员表
  7. */
  8. class StaffTeamList Extends Model {
  9. use SoftDelete;
  10. protected $name = 'qingdongams_staff_team_list';
  11. // 开启自动写入时间戳字段
  12. protected $autoWriteTimestamp = 'int';
  13. // 定义时间戳字段名
  14. protected $createTime = 'createtime';
  15. protected $updateTime = 'updatetime';
  16. protected $deleteTime = 'deletetime';
  17. public function staff() {
  18. return $this->hasOne(Staff::class, 'id', 'staff_id')->field('id,name,img,post,department_id,status');
  19. }
  20. }