1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
| <?php
|
| namespace app\common\model\branch;
|
| use app\common\model\BaseModel;
|
| /**
| * 连盟账户模型
| */
| class Account extends BaseModel
| {
| protected $name = 'branch_account';
| protected $pk = 'account_id';
|
| /**
| * 关联应用表
| */
| public function branch()
| {
| return $this->belongsTo('app\\common\\model\\branch\\Branch', 'branch_id', 'branch_id');
| }
| /**
| * 详情
| */
| public static function detail($branch_id, $with = [])
| {
| return (new static())->with($with)->where('branch_id', '=', $branch_id)->findOrEmpty();
| }
|
|
|
| }
|
|