quanwei
2025-11-21 2d9362ae6f528f57e6133d5d80f0b633c24e8eb6
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
33
<?php
namespace app\common\model\agent;
 
use app\agent\model\Agent;
use app\common\model\BaseModel;
 
/**
 * 超管后台门店模型
 */
class Store extends BaseModel
{
    protected $name = 'admin_store';
    protected $pk = 'store_id';
    
    /**
     * 模板详情
     */
    public static function detail($store_id)
    {
        return self::find($store_id);
    }
 
    /**
     * 与代理商关联
     * @return \think\model\relation\BelongsTo
     */
    public function agent()
    {
 
        return $this->hasOne(Agent::class, 'agent_id', 'agent_id');
 
    }
}