新增药品订单接口

This commit is contained in:
2023-03-11 17:43:41 +08:00
parent 9a311d78f3
commit 9fd87ac071
7 changed files with 232 additions and 24 deletions
+16
View File
@@ -282,4 +282,20 @@ class UserDoctor extends Model
{
return self::where($params)->exists();
}
/**
* 获取医生数据
* 关联医院表
* @param array $params
* @param array $fields
* @return object|null
*/
public static function getWithHospitalOne(array $params,array $fields = ['*']): object|null
{
return self::with([
"Hospital:hospital_id,hospital_name,hospital_level_name"
])
->where($params)
->first($fields);
}
}