<?php
|
|
|
namespace app\common\model\branch;
|
|
use app\common\model\BaseModel;
|
|
/**
|
* 供应商服务保障模型
|
*/
|
class Position extends BaseModel
|
{
|
protected $name = 'branch_position';
|
protected $pk = 'position_id';
|
|
/**
|
* 所有
|
* @return \think\Collection
|
* @throws \think\db\exception\DataNotFoundException
|
* @throws \think\db\exception\DbException
|
* @throws \think\db\exception\ModelNotFoundException
|
*/
|
public static function getALL($map = [])
|
{
|
$model = new static;
|
if($map){
|
$model = $model->where($map);
|
}
|
return $model->order(['weight' => 'desc'])->select();
|
}
|
/**
|
* 详情
|
*/
|
public static function detail($position_id)
|
{
|
return (new static())->find($position_id);
|
}
|
}
|