新增医生详情

This commit is contained in:
2023-07-04 16:08:04 +08:00
parent 0078b06b40
commit 4848f9d957
12 changed files with 379 additions and 13 deletions
+3 -2
View File
@@ -38,8 +38,9 @@ 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 *User `gorm:"foreignKey:UserId;references:user_id" json:"user"` // 用户
Hospital *Hospital `gorm:"foreignKey:HospitalID;references:hospital_id" json:"hospital"` // 医院
User *User `gorm:"foreignKey:UserId;references:user_id" json:"user"` // 用户
Hospital *Hospital `gorm:"foreignKey:HospitalID;references:hospital_id" json:"hospital"` // 医院
UserDoctorInfo *UserDoctorInfo `gorm:"foreignKey:DoctorId;references:doctor_id" json:"user_doctor_info"` // 详情
}
func (m *UserDoctor) TableName() string {