<?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');
|
|
}
|
}
|