WorkUser.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\bug\model;
  3. use app\user\model\Account;
  4. use think\model\concern\SoftDelete;
  5. class WorkUser extends Base
  6. {
  7. //设置字段信息
  8. use SoftDelete;
  9. protected $schema = [
  10. 'id' =>'int',//
  11. 'account_id' =>'int',//账户id
  12. 'role_id' =>'int',//岗位角色id
  13. 'companyNo' =>'varchar',//岗位角色id
  14. 'status' =>'tinyint',//状态 0未启用1启用 2推送到系统3推送失败4已废弃
  15. 'apply_name' =>'varchar',//
  16. 'apply_id' =>'int',//
  17. 'createTime' =>'datetime',//
  18. 'updateTime' =>'datetime',//
  19. 'delete_time' =>'datetime',//
  20. ];
  21. protected $updateTime='updateTime';
  22. protected $createTime='createTime';
  23. protected $deleteTime = 'delete_time';
  24. public static $statusCn=["未启用","启用","已推送","推送失败","废弃"];
  25. public function Account(){
  26. return $this->belongsTo(Account::class,"account_id","id");
  27. }
  28. public function WorkRole(){
  29. return $this->belongsTo(WorkRole::class,'role_id','id')->bind(["role_name","belong","work_id",'belong_role_id']);
  30. }
  31. }