49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace app\common\model\user;
|
|
|
|
|
|
use app\common\model\BaseModel;
|
|
|
|
|
|
class ExchangePickupPoint extends BaseModel
|
|
{
|
|
|
|
|
|
public static function tablePk(): string{
|
|
return 'id';
|
|
}
|
|
|
|
|
|
public static function tableName(): string{
|
|
return 'exchange_pickup_point';
|
|
}
|
|
/**
|
|
* Common: 获取器 —— 用户id列表转数组
|
|
* Author: wu-hui
|
|
* Time: 2024/01/14 11:35
|
|
* @param $value
|
|
* @return false|string[]
|
|
*/
|
|
public function getUidListAttr($value){
|
|
$value = explode(',',$value);
|
|
return array_combine($value,$value);
|
|
}
|
|
/**
|
|
* Common: 获取器 —— 负责人列表
|
|
* Author: wu-hui
|
|
* Time: 2024/01/14 11:38
|
|
* @return array
|
|
* @throws \think\db\exception\DataNotFoundException
|
|
* @throws \think\db\exception\DbException
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
*/
|
|
public function getUserListAttr(){
|
|
return User::whereIn('uid',$this->uid_list)
|
|
->column(['uid','real_name','nickname','avatar','phone'],'uid');
|
|
}
|
|
|
|
|
|
|
|
}
|