WorkUser.php 1.0 KB

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