药品、处方列表关联药房信息

This commit is contained in:
haomingming
2026-09-07 16:25:04 +08:00
parent 5f2baaace7
commit 3205005b9a
10 changed files with 224 additions and 1 deletions
+4
View File
@@ -50,11 +50,15 @@ type OrderProduct struct {
ConsigneeNameMask string `gorm:"column:consignee_name_mask;type:varchar(150);comment:收货人姓名(掩码)" json:"consignee_name_mask"`
ConsigneeTel string `gorm:"column:consignee_tel;type:varchar(50);comment:收货人电话" json:"consignee_tel"`
ConsigneeTelMask string `gorm:"column:consignee_tel_mask;type:varchar(50);comment:收货人电话(掩码)" json:"consignee_tel_mask"`
PharmacyId int64 `gorm:"column:pharmacy_id;type:bigint(19);default:0;comment:发货药房id" json:"pharmacy_id"`
PharmacyCode string `gorm:"column:pharmacy_code;type:varchar(64);comment:发货药房代码快照" json:"pharmacy_code"`
PharmacyName string `gorm:"column:pharmacy_name;type:varchar(100);comment:发货药房名称快照" json:"pharmacy_name"`
UserDoctor *UserDoctor `gorm:"foreignKey:DoctorId;references:doctor_id" json:"user_doctor"` // 医生
OrderInquiry *OrderInquiry `gorm:"foreignKey:OrderInquiryId;references:order_inquiry_id" json:"order_inquiry"` // 问诊
UserPatient *UserPatient `gorm:"foreignKey:PatientId;references:patient_id" json:"user_patient"` // 患者
OrderPrescription *OrderPrescription `gorm:"foreignKey:OrderPrescriptionId;references:order_prescription_id" json:"order_prescription"` // 处方
OrderProductItem []*OrderProductItem `gorm:"foreignKey:OrderProductId;references:order_product_id" json:"order_product_item"` // 处方
Pharmacy *Pharmacy `gorm:"foreignKey:PharmacyId;references:pharmacy_id" json:"pharmacy"` // 药房
Model
}