12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\bug\model;
- use app\user\model\Account;
- use think\model\concern\SoftDelete;
- class WorkUser extends Base
- {
- //设置字段信息
- use SoftDelete;
- protected $schema = [
- 'id' =>'int',//
- 'account_id' =>'int',//账户id
- 'role_id' =>'int',//岗位角色id
- 'companyNo' =>'varchar',//岗位角色id
- 'status' =>'tinyint',//状态 0未启用1启用 2推送到系统3推送失败4已废弃
- 'apply_name' =>'varchar',//
- 'apply_id' =>'int',//
- 'createTime' =>'datetime',//
- 'updateTime' =>'datetime',//
- 'delete_time' =>'datetime',//
- ];
- protected $updateTime='updateTime';
- protected $createTime='createTime';
- protected $deleteTime = 'delete_time';
- public static $statusCn=["未启用","启用","已推送","推送失败","废弃"];
-
- public function Account(){
- return $this->belongsTo(Account::class,"account_id","id");
- }
-
- public function WorkRole(){
- return $this->belongsTo(WorkRole::class,'role_id','id')->bind(["role_name","belong","work_id",'belong_role_id']);
- }
- }
|