1234567891011121314151617181920212223242526 |
- <?php
- namespace app\user\model;
- class AccountItem extends Base
- {
- protected $schema = [
- 'id' =>'bigint',
- 'account_id' =>'bigint',
- 'itemid' =>'int',
- 'position' =>'tinyint',
- '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"]);
- }
- public function accountInfo(){
- return $this->belongsTo(Account::class,'account_id')->bind(['nickname',"account_status"=>"status"]);
- }
- }
|