首页推荐医生
This commit is contained in:
@@ -81,6 +81,14 @@ class UserDoctor extends Model
|
||||
return $this->hasOne(Hospital::class, 'hospital_id', 'hospital_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联用户表
|
||||
*/
|
||||
public function User(): HasOne
|
||||
{
|
||||
return $this->hasOne(User::class, 'user_id', 'user_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联问诊配置表(一对多)
|
||||
* @return HasMany
|
||||
@@ -108,13 +116,6 @@ class UserDoctor extends Model
|
||||
return $this->hasMany(OrderInquiry::class, "doctor_id", "doctor_id");
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 关联职称表
|
||||
// */
|
||||
// public function BasicDoctorTitle(): HasOne
|
||||
// {
|
||||
// return $this->hasOne(BasicDoctorTitle::class, 'doctor_title_id', 'doctor_title_id');
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取医生信息-单条
|
||||
@@ -189,6 +190,7 @@ class UserDoctor extends Model
|
||||
$datas = self::with([
|
||||
'Hospital:hospital_id,hospital_name,hospital_level_name',
|
||||
"DoctorInquiryConfig",
|
||||
"User"
|
||||
])
|
||||
->where($params)
|
||||
->orderBy("is_recommend", "desc")
|
||||
|
||||
Reference in New Issue
Block a user