medicine_Info.go 1.6 KB

1234567891011121314151617181920212223
  1. package models
  2. import model2 "Medical_ERP/common/model"
  3. type MedicineInfo struct {
  4. model2.Model
  5. ProductID int `json:"productId" gorm:"size:4;"` // 药品名称id
  6. EnterpriseID int `json:"enterpriseId" gorm:"size:4;"` // 生产企业id
  7. SpecID int `json:"specId" gorm:"size:4;"` // 规格id
  8. UnitID int `json:"unitId" gorm:"size:4;"` // 单位id 非必填
  9. DosageFormID int `json:"dosageFormId" gorm:"size:4;"` // 剂型id 非必填
  10. ApprovalNumber string `json:"approvalNumber" gorm:"size:128;"` // 批准文号
  11. QualificationNumber string `json:"qualificationNumber" gorm:"size:128;"` // 批签发合格编号
  12. ProductionDate string `json:"productionDate" gorm:"size:128;"` // 生产日期
  13. ExpiryDate string `json:"expiryDate" gorm:"size:128;"` // 失效日期
  14. BatchNumber string `json:"batchNumber" gorm:"size:128;"` // 批号
  15. Qrcode string `json:"qrcode" gorm:"size:256;"` // 追溯码
  16. Product Product `json:"product" gorm:"->;foreignkey:ProductID;references:Id"`
  17. Enterprise Enterprise `json:"enterprise" gorm:"->;foreignkey:EnterpriseID;references:Id"`
  18. Spec Spec `json:"spec" gorm:"->;foreignkey:SpecID;references:Id"`
  19. Unit Unit `json:"unit" gorm:"->;foreignkey:UnitID;references:Id"`
  20. DosageForm DosageForm `json:"dosageForm" gorm:"->;foreignkey:DosageFormID;references:Id"`
  21. }