12345678910111213141516171819202122232425262728293031323334 |
- <?php
- namespace app\bug\model;
- use think\model\concern\SoftDelete;
- class WorkSubinfo extends Base
- { use SoftDelete;
- //设置字段信息
- protected $schema = [
- 'id' =>'bigint',//
- 'sub_id' =>'int',//岗位申请id
- 'content' =>'text',//功能内容
- 'action_id' =>'int',//功能id
- 'type' =>'tinyint',//类型 1添加2删除
- 'status' =>'tinyint',//状态 0待审批 1同意2驳回
- 'remark' =>'varchar',//
- 'createTime' =>'datetime',//
- 'updateTime' =>'datetime',//
- 'delete_time' =>'datetime',//
- ];
- protected $updateTime='updateTime';
- protected $createTime='createTime';
- protected $deleteTime = 'delete_time';
-
- public function WorkSub(){
- return $this->belongsTo(WorkSubscr::class,"sub_id","id");
- }
-
- public function SetContentAttr($v){
- return json_encode($v,JSON_UNESCAPED_UNICODE);
- }
- public function GetContentAttr($v){
- return json_decode($v,true);
- }
- }
|