new_drug_stock.go 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package models
  2. type NewDrugFlow struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id" form:"warehousing_id"`
  5. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  6. Number string `gorm:"column:number" json:"number" form:"number"`
  7. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  8. Count int64 `gorm:"column:count" json:"count" form:"count"`
  9. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  10. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  11. SystemTime int64 `gorm:"column:system_time" json:"system_time" form:"system_time"`
  12. ConsumableType int64 `gorm:"column:consumable_type" json:"consumable_type" form:"consumable_type"`
  13. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  14. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  15. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  16. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  17. IsEdit int64 `gorm:"column:is_edit" json:"is_edit" form:"is_edit"`
  18. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id" form:"cancel_stock_id"`
  19. CancelOrderNumber string `gorm:"column:cancel_order_number" json:"cancel_order_number" form:"cancel_order_number"`
  20. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  21. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  22. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  23. UpdateCreator int64 `gorm:"column:update_creator" json:"update_creator" form:"update_creator"`
  24. Status int64 `gorm:"column:status" json:"status" form:"status"`
  25. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  26. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  27. Price float64 `gorm:"column:price" json:"price" form:"price"`
  28. WarehousingDetailId int64 `gorm:"column:warehousing_detail_id" json:"warehousing_detail_id" form:"warehousing_detail_id"`
  29. WarehouseOutDetailId int64 `gorm:"column:warehouse_out_detail_id" json:"warehouse_out_detail_id" form:"warehouse_out_detail_id"`
  30. CancelOutDetailId int64 `gorm:"column:cancel_out_detail_id" json:"cancel_out_detail_id" form:"cancel_out_detail_id"`
  31. ExpireDate int64 `gorm:"column:expire_date" json:"expire_date" form:"expire_date"`
  32. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  33. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  34. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  35. StockMaxNumber int64 `gorm:"column:stock_max_number" json:"stock_max_number" form:"stock_max_number"`
  36. StockMinNumber int64 `gorm:"column:stock_min_number" json:"stock_min_number" form:"stock_min_number"`
  37. LastStockMaxNumber int64 `gorm:"column:last_stock_max_number" json:"last_stock_max_number" form:"last_stock_max_number"`
  38. LastStockMinNumber int64 `gorm:"column:last_stock_min_number" json:"last_stock_min_number" form:"last_stock_min_number"`
  39. DrugWarehouseInfo []*DrugWarehouseInfo `gorm:"ForeignKey:DrugId;AssociationForeignKey:DrugId" `
  40. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId" `
  41. AdviceId int64 `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
  42. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  43. SupplyCancelOutId int64 `gorm:"column:supply_cancel_out_id" json:"supply_cancel_out_id" form:"supply_cancel_out_id"`
  44. SupplyWarehouseDetailInfo int64 `gorm:"column:supply_warehouse_detail_info" json:"supply_warehouse_detail_info" form:"supply_warehouse_detail_info"`
  45. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  46. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  47. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  48. LastPrice float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
  49. StockCount string `gorm:"column:stock_count" json:"stock_count" form:"stock_count"`
  50. PharmacyId int64 `gorm:"column:pharmacy_id" json:"pharmacy_id" form:"pharmacy_id"`
  51. DrugWarehouseInfoOne DrugWarehouseInfo `gorm:"ForeignKey:ID;AssociationForeignKey:WarehousingDetailId"json:"xt_drug_warehouse_info" `
  52. IsRead int64 `gorm:"column:is_read" json:"is_read" form:"is_read"`
  53. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  54. OverCount int64 `gorm:"column:over_count" json:"over_count" form:"over_count"`
  55. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  56. XtDrugWarehouseOutInfo XtDrugWarehouseOutInfo `gorm:"ForeignKey:ID;AssociationForeignKey:WarehouseOutDetailId"json:"xt_drug_warehouse_out_info" `
  57. OrderId int64 `gorm:"column:order_id" json:"order_id" form:"order_id"`
  58. FlushOverCount int64 `gorm:"column:flush_over_count" json:"flush_over_count" form:"flush_over_count"`
  59. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  60. DrugCode string `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
  61. OperateTime int64 `gorm:"column:operate_time" json:"operate_time" form:"operate_time"`
  62. SaleDate string `gorm:"column:sale_date" json:"sale_date" form:"sale_date"`
  63. IsSale int64 `gorm:"column:is_sale" json:"is_sale" form:"is_sale"`
  64. IsChange int64 `gorm:"column:is_change" json:"is_change" form:"is_change"`
  65. Bchno string `gorm:"column:bchno" json:"bchno" form:"bchno"`
  66. BgBchno string `gorm:"column:bg_bchno" json:"bg_bchno" form:"bg_bchno"`
  67. HisDoctorAdviceInfo HisDoctorAdviceInfo `gorm:"ForeignKey:PatientId,AdviceDate,DrugId;AssociationForeignKey:PatientId,SystemTime,DrugId"json:"his_advice_info" `
  68. PCount float64
  69. SDate string
  70. PDate int64
  71. Unit string
  72. }
  73. func (NewDrugFlow) TableName() string {
  74. return "xt_drug_flow"
  75. }