new_stock_models.go 35KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. package models
  2. type NewWarehousing struct {
  3. ID int64 `gorm:"column:id" json:"id"`
  4. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order"`
  5. OperationTime int64 `gorm:"column:operation_time" json:"operation_time"`
  6. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  7. Creater int64 `gorm:"column:creater" json:"creater"`
  8. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  9. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  10. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  11. Status int64 `gorm:"column:status" json:"status"`
  12. WarehousingTime int64 `gorm:"column:warehousing_time" json:"warehousing_time"`
  13. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  14. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  15. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  16. Dealers Dealers `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  17. Type int64 `gorm:"column:type" json:"type"`
  18. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  19. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  20. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  21. SecondWarehouseId int64 `gorm:"column:second_warehouse_id" json:"second_warehouse_id" form:"second_warehouse_id"`
  22. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  23. }
  24. func (NewWarehousing) TableName() string {
  25. return "xt_warehouse"
  26. }
  27. type NewWarehousingInfo struct {
  28. ID int64 `gorm:"column:id" json:"id"`
  29. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id"`
  30. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  31. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  32. Number string `gorm:"column:number" json:"number"`
  33. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  34. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  35. WarehousingCount int64 `gorm:"column:warehousing_count" json:"warehousing_count"`
  36. WarehousingUnit string `gorm:"column:warehousing_unit" json:"warehousing_unit"`
  37. Price float64 `gorm:"column:price" json:"price"`
  38. TotalPrice float64 `gorm:"column:total_price" json:"total_price"`
  39. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  40. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  41. Remark string `gorm:"column:remark" json:"remark"`
  42. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  43. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  44. Status int64 `gorm:"column:status" json:"status"`
  45. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  46. IsReturn int64 `gorm:"column:is_return" json:"is_return"`
  47. StockCount int64 `gorm:"column:stock_count" json:"stock_count" form:"stock_count"`
  48. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order"`
  49. Type int64 `gorm:"column:type" json:"type"`
  50. GoodName string `json:"good_name"`
  51. PackingUnit string `json:"packing_unit"`
  52. TotalCount int64 `json:"total_count"`
  53. SpecificationName string `json:"specification_name"`
  54. LicenseNumber string `gorm:"column:license_number" json:"license_number" form:"license_number"`
  55. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  56. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  57. GoodInfo GoodInfo `gorm:"ForeignKey:ID;AssociationForeignKey:GoodId" json:"infos"`
  58. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  59. Dealers Dealers `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  60. }
  61. func (NewWarehousingInfo) TableName() string {
  62. return "xt_warehouse_info"
  63. }
  64. type NewWarehouseOut struct {
  65. ID int64 `gorm:"column:id" json:"id"`
  66. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number"`
  67. OperationTime int64 `gorm:"column:operation_time" json:"operation_time"`
  68. Creater int64 `gorm:"column:creater" json:"creater"`
  69. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  70. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  71. Remark string `gorm:"column:remark" json:"remark"`
  72. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  73. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  74. Status int64 `gorm:"column:status" json:"status"`
  75. WarehouseOutTime int64 `gorm:"column:warehouse_out_time" json:"warehouse_out_time"`
  76. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  77. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  78. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  79. Dealers Dealers `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  80. Type int64 `gorm:"column:type" json:"type"`
  81. IsSys int64 `gorm:"column:is_sys" json:"is_sys"`
  82. SupplyCancelOutId int64 `gorm:"column:supply_cancel_out_id" json:"supply_cancel_out_id" form:"supply_cancel_out_id"`
  83. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  84. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  85. SecondWarehouseId int64 `gorm:"column:second_warehouse_id" json:"second_warehouse_id" form:"second_warehouse_id"`
  86. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  87. }
  88. func (NewWarehouseOut) TableName() string {
  89. return "xt_warehouse_out"
  90. }
  91. type NewWarehouseOutInfo struct {
  92. ID int64 `gorm:"column:id" json:"id"`
  93. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id"`
  94. WarehouseInfotId int64 `gorm:"column:warehouse_info_id" json:"warehouse_info_id"`
  95. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  96. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  97. WarehousingOutTarget int64 `gorm:"column:warehousing_out_target" json:"warehousing_out_target"`
  98. Count int64 `gorm:"column:count" json:"count"`
  99. Price float64 `gorm:"column:price" json:"price"`
  100. TotalPrice float64 `gorm:"column:total_price" json:"total_price"`
  101. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  102. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  103. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  104. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  105. Status int64 `gorm:"column:status" json:"status"`
  106. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  107. Remark string `gorm:"column:remark" json:"remark"`
  108. IsCancel int64 `gorm:"column:is_cancel" json:"is_cancel"`
  109. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number"`
  110. GoodInfo GoodInfo `gorm:"ForeignKey:ID;AssociationForeignKey:GoodId" json:"info"`
  111. Type int64 `gorm:"column:type" json:"type"`
  112. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  113. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  114. IsSys int64 `gorm:"column:is_sys" json:"is_sys"`
  115. SysRecordTime int64 `gorm:"column:sys_record_time" json:"sys_record_time"`
  116. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  117. Number string `gorm:"column:number" json:"number" form:"number"`
  118. LicenseNumber string `gorm:"column:license_number" json:"license_number" form:"license_number"`
  119. ConsumableType int64 `gorm:"column:consumable_type" json:"consumable_type" form:"consumable_type"`
  120. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  121. SupplyCancelOutId int64 `gorm:"column:supply_cancel_out_id" json:"supply_cancel_out_id" form:"supply_cancel_out_id"`
  122. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  123. IsSource int64 `gorm:"column:is_source" json:"is_source" form:"is_source"`
  124. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  125. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  126. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  127. BuyPrice float64 `gorm:"column:buy_price" json:"buy_price" form:"buy_price"`
  128. StockCount string `gorm:"column:stock_count" json:"stock_count" form:"stock_count"`
  129. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  130. RegisterNumber string `gorm:"column:register_number" json:"register_number" form:"register_number"`
  131. WarehousingInfo WarehousingInfo `gorm:"ForeignKey:ID;AssociationForeignKey:WarehouseInfotId" `
  132. VmStockFlow VmStockFlow `gorm:"ForeignKey:ID;AssociationForeignKey:WarehouseOutDetailId" json:"stock_flow"`
  133. OverCount int64 `gorm:"column:over_count" json:"over_count" form:"over_count"`
  134. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  135. Dealers Dealers `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  136. }
  137. func (NewWarehouseOutInfo) TableName() string {
  138. return "xt_warehouse_out_info"
  139. }
  140. type NewCancelStock struct {
  141. ID int64 `gorm:"column:id" json:"id"`
  142. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  143. OperaTime int64 `gorm:"column:opera_time" json:"opera_time"`
  144. Total int64 `gorm:"column:total" json:"total"`
  145. Creater int64 `gorm:"column:creater" json:"creater"`
  146. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  147. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  148. Status int64 `gorm:"column:status" json:"status"`
  149. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  150. ReturnTime int64 `gorm:"column:return_time" json:"return_time"`
  151. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  152. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  153. Type int64 `gorm:"column:type" json:"type"`
  154. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  155. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  156. }
  157. func (NewCancelStock) TableName() string {
  158. return "xt_cancel_stock"
  159. }
  160. type NewCancelStockInfo struct {
  161. ID int64 `gorm:"column:id" json:"id"`
  162. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  163. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
  164. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  165. Count int64 `gorm:"column:count" json:"count"`
  166. Price float64 `gorm:"column:price" json:"price"`
  167. Total float64 `gorm:"column:total" json:"total"`
  168. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  169. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  170. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  171. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  172. Status int64 `gorm:"column:status" json:"status"`
  173. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  174. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  175. Type int64 `gorm:"column:type" json:"type"`
  176. Dealer string `gorm:"column:dealer" json:"dealer"`
  177. Manufacturer string `gorm:"column:manufacturer" json:"manufacturer"`
  178. Number string `gorm:"column:number" json:"number" form:"number"`
  179. RegisterAccount string `gorm:"column:register_account" json:"register_account" form:"register_account"`
  180. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  181. WarehouseInfoId int64 `gorm:"column:warehouse_info_id" json:"warehouse_info_id" form:"warehouse_info_id"`
  182. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  183. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  184. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  185. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  186. GoodInfo GoodInfo `gorm:"ForeignKey:ID;AssociationForeignKey:GoodId" json:"info"`
  187. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  188. Dealers Dealers `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  189. }
  190. func (NewCancelStockInfo) TableName() string {
  191. return "xt_cancel_stock_info"
  192. }
  193. type NewDrugWarehouse struct {
  194. ID int64 `gorm:"column:id" json:"id" form:"id"`
  195. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  196. OperationTime int64 `gorm:"column:operation_time" json:"operation_time" form:"operation_time"`
  197. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  198. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  199. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  200. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  201. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  202. Status int64 `gorm:"column:status" json:"status" form:"status"`
  203. WarehousingTime int64 `gorm:"column:warehousing_time" json:"warehousing_time" form:"warehousing_time"`
  204. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  205. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  206. Type int64 `gorm:"column:type" json:"type" form:"type"`
  207. }
  208. func (NewDrugWarehouse) TableName() string {
  209. return "xt_drug_warehouse"
  210. }
  211. type NewDrugWarehouseInfo struct {
  212. ID int64 `gorm:"column:id" json:"id" form:"id"`
  213. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id" form:"warehousing_id"`
  214. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  215. Number string `gorm:"column:number" json:"number" form:"number"`
  216. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  217. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  218. WarehousingCount int64 `gorm:"column:warehousing_count" json:"warehousing_count" form:"warehousing_count"`
  219. Price float64 `gorm:"column:price" json:"price" form:"price"`
  220. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  221. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  222. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  223. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  224. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  225. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  226. Status int64 `gorm:"column:status" json:"status" form:"status"`
  227. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  228. IsReturn int64 `gorm:"column:is_return" json:"is_return" form:"is_return"`
  229. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  230. Type int64 `gorm:"column:type" json:"type" form:"type"`
  231. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  232. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  233. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId" json:"drug"`
  234. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  235. Dealers Dealers `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  236. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  237. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  238. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  239. StockMaxNumber int64 `gorm:"column:stock_max_number" json:"stock_max_number" form:"stock_max_number"`
  240. StockMinNumber int64 `gorm:"column:stock_min_number" json:"stock_min_number" form:"stock_min_number"`
  241. WarehousingInfoId int64 `gorm:"column:warehousing_info_id" json:"warehousing_info_id" form:"warehousing_info_id"`
  242. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  243. SupplyWarehouseDetailInfo int64 `gorm:"column:supply_warehouse_detail_info" json:"supply_warehouse_detail_info" form:"supply_warehouse_detail_info"`
  244. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  245. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  246. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  247. IsPc int64 `gorm:"column:is_pc" json:"is_pc" form:"is_pc"`
  248. IsBg int64 `gorm:"column:is_bg" json:"is_bg" form:"is_bg"`
  249. Bchno string `gorm:"column:bchno" json:"bchno" form:"bchno"`
  250. PcDate int64 `gorm:"column:pc_date" json:"pc_date" form:"pc_date"`
  251. BgBchno string `gorm:"column:bg_bchno" json:"bg_bchno" form:"bg_bchno"`
  252. DrugCode string `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
  253. }
  254. func (NewDrugWarehouseInfo) TableName() string {
  255. return "xt_drug_warehouse_info"
  256. }
  257. type NewDrugWarehouseOut struct {
  258. ID int64 `gorm:"column:id" json:"id" form:"id"`
  259. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  260. OperationTime int64 `gorm:"column:operation_time" json:"operation_time" form:"operation_time"`
  261. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  262. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  263. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  264. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  265. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  266. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  267. Status int64 `gorm:"column:status" json:"status" form:"status"`
  268. WarehouseOutTime int64 `gorm:"column:warehouse_out_time" json:"warehouse_out_time" form:"warehouse_out_time"`
  269. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  270. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  271. Type int64 `gorm:"column:type" json:"type" form:"type"`
  272. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  273. Manufacturers *Manufacturer `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
  274. Dealers *Dealers `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
  275. }
  276. func (NewDrugWarehouseOut) TableName() string {
  277. return "xt_drug_warehouse_out"
  278. }
  279. type NewDrugWarehouseOutInfo struct {
  280. ID int64 `gorm:"column:id" json:"id" form:"id"`
  281. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  282. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  283. WarehousingOutTarget int64 `gorm:"column:warehousing_out_target" json:"warehousing_out_target" form:"warehousing_out_target"`
  284. Count int64 `gorm:"column:count" json:"count" form:"count"`
  285. Price float64 `gorm:"column:price" json:"price" form:"price"`
  286. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  287. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  288. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  289. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  290. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  291. Status int64 `gorm:"column:status" json:"status" form:"status"`
  292. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  293. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  294. IsCancel int64 `gorm:"column:is_cancel" json:"is_cancel" form:"is_cancel"`
  295. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  296. Type int64 `gorm:"column:type" json:"type" form:"type"`
  297. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  298. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  299. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  300. SysRecordTime int64 `gorm:"column:sys_record_time" json:"sys_record_time" form:"sys_record_time"`
  301. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  302. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  303. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId" json:"drug"`
  304. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  305. Dealers Dealers `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  306. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  307. WarehouseInfoId int64 `gorm:"column:warehouse_info_id" json:"warehouse_info_id" form:"warehouse_info_id"`
  308. NewDrugWarehouseInfo NewDrugWarehouseInfo `gorm:"ForeignKey:ID;AssociationForeignKey:WarehouseInfoId" json:"in_info"`
  309. }
  310. func (NewDrugWarehouseOutInfo) TableName() string {
  311. return "xt_drug_warehouse_out_info"
  312. }
  313. type NewDrugCancelStock struct {
  314. ID int64 `gorm:"column:id" json:"id" form:"id"`
  315. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  316. OperaTime int64 `gorm:"column:opera_time" json:"opera_time" form:"opera_time"`
  317. Total int64 `gorm:"column:total" json:"total" form:"total"`
  318. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  319. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  320. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  321. Status int64 `gorm:"column:status" json:"status" form:"status"`
  322. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  323. ReturnTime int64 `gorm:"column:return_time" json:"return_time" form:"return_time"`
  324. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  325. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  326. Type int64 `gorm:"column:type" json:"type" form:"type"`
  327. Manufacturers *Manufacturer `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
  328. Dealers *Dealers `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
  329. }
  330. func (NewDrugCancelStock) TableName() string {
  331. return "xt_drug_cancel_stock"
  332. }
  333. type NewDrugCancelStockInfo struct {
  334. ID int64 `gorm:"column:id" json:"id" form:"id"`
  335. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  336. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id" form:"cancel_stock_id"`
  337. Count int64 `gorm:"column:count" json:"count" form:"count"`
  338. Price float64 `gorm:"column:price" json:"price" form:"price"`
  339. Total float64 `gorm:"column:total" json:"total" form:"total"`
  340. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  341. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  342. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  343. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  344. Status int64 `gorm:"column:status" json:"status" form:"status"`
  345. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  346. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  347. Type int64 `gorm:"column:type" json:"type" form:"type"`
  348. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  349. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  350. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  351. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  352. Number string `gorm:"column:number" json:"number" form:"number"`
  353. BaseDrugLib BaseDrugLib `gorm:"ForeignKey:ID;AssociationForeignKey:DrugId" json:"drug"`
  354. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  355. Dealers Dealers `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  356. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  357. }
  358. func (NewDrugCancelStockInfo) TableName() string {
  359. return "xt_drug_cancel_stock_info"
  360. }
  361. type DrugFlow struct {
  362. ID int64 `gorm:"column:id" json:"id" form:"id"`
  363. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id" form:"warehousing_id"`
  364. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  365. Number string `gorm:"column:number" json:"number" form:"number"`
  366. BatchNumber string `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
  367. Count int64 `gorm:"column:count" json:"count" form:"count"`
  368. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  369. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  370. SystemTime int64 `gorm:"column:system_time" json:"system_time" form:"system_time"`
  371. ConsumableType int64 `gorm:"column:consumable_type" json:"consumable_type" form:"consumable_type"`
  372. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  373. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  374. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  375. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  376. IsEdit int64 `gorm:"column:is_edit" json:"is_edit" form:"is_edit"`
  377. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id" form:"cancel_stock_id"`
  378. CancelOrderNumber string `gorm:"column:cancel_order_number" json:"cancel_order_number" form:"cancel_order_number"`
  379. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  380. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  381. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  382. UpdateCreator int64 `gorm:"column:update_creator" json:"update_creator" form:"update_creator"`
  383. Status int64 `gorm:"column:status" json:"status" form:"status"`
  384. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  385. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  386. Price float64 `gorm:"column:price" json:"price" form:"price"`
  387. WarehousingDetailId int64 `gorm:"column:warehousing_detail_id" json:"warehousing_detail_id" form:"warehousing_detail_id"`
  388. WarehouseOutDetailId int64 `gorm:"column:warehouse_out_detail_id" json:"warehouse_out_detail_id" form:"warehouse_out_detail_id"`
  389. CancelOutDetailId int64 `gorm:"column:cancel_out_detail_id" json:"cancel_out_detail_id" form:"cancel_out_detail_id"`
  390. ExpireDate int64 `gorm:"column:expire_date" json:"expire_date" form:"expire_date"`
  391. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  392. MaxUnit string `gorm:"column:max_unit" json:"max_unit" form:"max_unit"`
  393. MinUnit string `gorm:"column:min_unit" json:"min_unit" form:"min_unit"`
  394. StockMaxNumber int64 `gorm:"column:stock_max_number" json:"stock_max_number" form:"stock_max_number"`
  395. StockMinNumber int64 `gorm:"column:stock_min_number" json:"stock_min_number" form:"stock_min_number"`
  396. LastStockMaxNumber int64 `gorm:"column:last_stock_max_number" json:"last_stock_max_number" form:"last_stock_max_number"`
  397. LastStockMinNumber int64 `gorm:"column:last_stock_min_number" json:"last_stock_min_number" form:"last_stock_min_number"`
  398. AdviceId int64 `gorm:"column:advice_id" json:"advice_id" form:"advice_id"`
  399. HisDoctorAdviceInfo HisDoctorAdviceInfo `gorm:"ForeignKey:PatientId,RecordDate,DrugId;AssociationForeignKey:PatientId,SystemTime,DrugId" json:"advice"`
  400. SupplyWarehouseId int64 `gorm:"column:supply_warehouse_id" json:"supply_warehouse_id" form:"supply_warehouse_id"`
  401. SupplyCancelOutId int64 `gorm:"column:supply_cancel_out_id" json:"supply_cancel_out_id" form:"supply_cancel_out_id"`
  402. SupplyWarehouseDetailInfo int64 `gorm:"column:supply_warehouse_detail_info" json:"supply_warehouse_detail_info" form:"supply_warehouse_detail_info"`
  403. StorehouseId int64 `gorm:"column:storehouse_id" json:"storehouse_id" form:"storehouse_id"`
  404. SecondWarehouseInfoId int64 `gorm:"column:second_warehouse_info_id" json:"second_warehouse_info_id" form:"second_warehouse_info_id"`
  405. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  406. LastPrice float64 `gorm:"column:last_price" json:"last_price" form:"last_price"`
  407. StockCount string `gorm:"column:stock_count" json:"stock_count" form:"stock_count"`
  408. PharmacyId int64 `gorm:"column:pharmacy_id" json:"pharmacy_id" form:"pharmacy_id"`
  409. IsRead int64 `gorm:"column:is_read" json:"is_read" form:"is_read"`
  410. IsCheck int64 `gorm:"column:is_check" json:"is_check" form:"is_check"`
  411. OverCount int64 `gorm:"column:over_count" json:"over_count" form:"over_count"`
  412. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  413. OrderId int64 `gorm:"column:order_id" json:"order_id" form:"order_id"`
  414. IsSale int64 `gorm:"column:is_sale" json:"is_sale" form:"is_sale"`
  415. IsChange int64 `gorm:"column:is_change" json:"is_change" form:"is_change"`
  416. NewDrugWarehouseInfo NewDrugWarehouseInfo `gorm:"ForeignKey:ID;AssociationForeignKey:WarehousingDetailId" json:"dw"`
  417. Bchno string `gorm:"column:bchno" json:"bchno" form:"bchno"`
  418. SaleDate string `gorm:"column:sale_date" json:"sale_date" form:"sale_date"`
  419. BgBchno string `gorm:"column:bg_bchno" json:"bg_bchno" form:"bg_bchno"`
  420. DrugCode string `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
  421. }
  422. func (DrugFlow) TableName() string {
  423. return "xt_drug_flow"
  424. }