新增医生列表

This commit is contained in:
2023-07-04 11:38:31 +08:00
parent 9796314616
commit 0078b06b40
9 changed files with 128 additions and 33 deletions
+3 -3
View File
@@ -23,7 +23,7 @@ type UserDoctor struct {
DepartmentCustomId int64 `gorm:"column:department_custom_id;type:bigint(19);comment:科室id-自定义" json:"department_custom_id"`
DepartmentCustomName string `gorm:"column:department_custom_name;type:varchar(100);comment:科室名称(如未自己输入,填入标准科室名称)" json:"department_custom_name"`
DepartmentCustomMobile string `gorm:"column:department_custom_mobile;type:varchar(30);comment:科室电话" json:"department_custom_mobile"`
HospitalId int64 `gorm:"column:hospital_id;type:bigint(19);comment:所属医院id" json:"hospital_id"`
HospitalID int64 `gorm:"column:hospital_id;type:bigint(19);comment:所属医院id" json:"hospital_id"`
ServedPatientsNum int `gorm:"column:served_patients_num;type:int(11);default:0;comment:服务患者数量(订单结束时统计)" json:"served_patients_num"`
PraiseRate float64 `gorm:"column:praise_rate;type:float(10,2);default:0.00;comment:好评率(百分制。订单平均评价中超过4-5分的订单总数 / 总订单数 * 5)" json:"praise_rate"`
AvgResponseTime float64 `gorm:"column:avg_response_time;type:float(10,2);default:0.00;comment:平均响应时间(分钟制)" json:"avg_response_time"`
@@ -38,8 +38,8 @@ type UserDoctor struct {
BeGoodAt string `gorm:"column:be_good_at;type:text;comment:擅长" json:"be_good_at"`
BriefIntroduction string `gorm:"column:brief_introduction;type:text;comment:医生简介" json:"brief_introduction"`
Model
User *AdminPost `gorm:"foreignKey:UserId" json:"user"` // 用户
Hospital *AdminPost `gorm:"foreignKey:HospitalId" json:"hospital"` // 医院
User *User `gorm:"foreignKey:UserId;references:user_id" json:"user"` // 用户
Hospital *Hospital `gorm:"foreignKey:HospitalID;references:hospital_id" json:"hospital"` // 医院
}
func (m *UserDoctor) TableName() string {