<?php
|
|
namespace app\common\model\branch;
|
|
use app\common\model\BaseModel;
|
|
/**
|
* 商家供应商提现账户模型
|
*/
|
class Group extends BaseModel
|
{
|
protected $name = 'branch_user_group';
|
protected $pk = 'group_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();
|
}
|
/**
|
* 详情
|
*/
|
public static function detailByCondition($where, $with = [])
|
{
|
return (new static())->with($with)->where($where)->find();
|
}
|
|
}
|