12345678910111213141516171819202122 |
- <?php
- namespace app\user\model;
- class AccountItem extends Base
- {
- //设置字段信息
- protected $schema = [
- 'id' =>'bigint',//
- 'account_id' =>'bigint',//账户id
- 'itemid' =>'int',//部门id
- 'position' =>'tinyint',//职位,1普通,2负责人
- 'addtime' =>'datetime',//
- 'updatetime' =>'datetime',//
- ];
- protected $updateTime='updatetime';
- protected $createTime='addtime';
- protected $hidden=["id","addtime"];
- public function ItemName(){
- return $this->belongsTo(CompanyItem::class,"itemid")->bind(["depart_name"=>"name","depart_link"]);
- }
- }
|