drug_stock.go 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. package models
  2. type DrugWarehouse struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  5. OperationTime int64 `gorm:"column:operation_time" json:"operation_time" form:"operation_time"`
  6. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  7. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  8. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  9. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  10. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  11. Status int64 `gorm:"column:status" json:"status" form:"status"`
  12. WarehousingTime int64 `gorm:"column:warehousing_time" json:"warehousing_time" form:"warehousing_time"`
  13. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  14. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  15. Type int64 `gorm:"column:type" json:"type" form:"type"`
  16. }
  17. func (DrugWarehouse) TableName() string {
  18. return "xt_drug_warehouse"
  19. }
  20. type DrugWarehouseInfo struct {
  21. ID int64 `gorm:"column:id" json:"id" form:"id"`
  22. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id" form:"warehousing_id"`
  23. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  24. Number string `gorm:"column:number" json:"number" form:"number"`
  25. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  26. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  27. WarehousingCount int64 `gorm:"column:warehousing_count" json:"warehousing_count" form:"warehousing_count"`
  28. Price float64 `gorm:"column:price" json:"price" form:"price"`
  29. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  30. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  31. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  32. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  33. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  34. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  35. Status int64 `gorm:"column:status" json:"status" form:"status"`
  36. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  37. IsReturn int64 `gorm:"column:is_return" json:"is_return" form:"is_return"`
  38. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order" form:"warehousing_order"`
  39. Type int64 `gorm:"column:type" json:"type" form:"type"`
  40. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  41. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  42. DrugCode string `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
  43. }
  44. func (DrugWarehouseInfo) TableName() string {
  45. return "xt_drug_warehouse_info"
  46. }
  47. type DrugWarehouseOut struct {
  48. ID int64 `gorm:"column:id" json:"id" form:"id"`
  49. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  50. OperationTime int64 `gorm:"column:operation_time" json:"operation_time" form:"operation_time"`
  51. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  52. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  53. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  54. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  55. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  56. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  57. Status int64 `gorm:"column:status" json:"status" form:"status"`
  58. WarehouseOutTime int64 `gorm:"column:warehouse_out_time" json:"warehouse_out_time" form:"warehouse_out_time"`
  59. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  60. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  61. Type int64 `gorm:"column:type" json:"type" form:"type"`
  62. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  63. Manufacturers *Manufacturer `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
  64. Dealers *Dealers `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
  65. }
  66. func (DrugWarehouseOut) TableName() string {
  67. return "xt_drug_warehouse_out"
  68. }
  69. type DrugWarehouseOutInfo struct {
  70. ID int64 `gorm:"column:id" json:"id" form:"id"`
  71. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  72. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  73. WarehousingOutTarget int64 `gorm:"column:warehousing_out_target" json:"warehousing_out_target" form:"warehousing_out_target"`
  74. Count int64 `gorm:"column:count" json:"count" form:"count"`
  75. Price float64 `gorm:"column:price" json:"price" form:"price"`
  76. TotalPrice float64 `gorm:"column:total_price" json:"total_price" form:"total_price"`
  77. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  78. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  79. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  80. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  81. Status int64 `gorm:"column:status" json:"status" form:"status"`
  82. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  83. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  84. IsCancel int64 `gorm:"column:is_cancel" json:"is_cancel" form:"is_cancel"`
  85. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  86. Type int64 `gorm:"column:type" json:"type" form:"type"`
  87. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  88. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  89. IsSys int64 `gorm:"column:is_sys" json:"is_sys" form:"is_sys"`
  90. SysRecordTime int64 `gorm:"column:sys_record_time" json:"sys_record_time" form:"sys_record_time"`
  91. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  92. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  93. }
  94. func (DrugWarehouseOutInfo) TableName() string {
  95. return "xt_drug_warehouse_out_info"
  96. }
  97. type DrugSalesReturn struct {
  98. ID int64 `gorm:"column:id" json:"id" form:"id"`
  99. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  100. OperaTime int64 `gorm:"column:opera_time" json:"opera_time" form:"opera_time"`
  101. Total int64 `gorm:"column:total" json:"total" form:"total"`
  102. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  103. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  104. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  105. Status int64 `gorm:"column:status" json:"status" form:"status"`
  106. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  107. ReturnTime int64 `gorm:"column:return_time" json:"return_time" form:"return_time"`
  108. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  109. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  110. Type int64 `gorm:"column:type" json:"type" form:"type"`
  111. Manufacturers *Manufacturer `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
  112. Dealers *Dealers `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
  113. }
  114. func (DrugSalesReturn) TableName() string {
  115. return "xt_drug_sales_return"
  116. }
  117. type DrugSalesReturnInfo struct {
  118. ID int64 `gorm:"column:id" json:"id" form:"id"`
  119. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  120. SalesReturnId int64 `gorm:"column:sales_return_id" json:"sales_return_id" form:"sales_return_id"`
  121. Count int64 `gorm:"column:count" json:"count" form:"count"`
  122. Price float64 `gorm:"column:price" json:"price" form:"price"`
  123. Total float64 `gorm:"column:total" json:"total" form:"total"`
  124. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  125. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  126. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  127. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  128. Status int64 `gorm:"column:status" json:"status" form:"status"`
  129. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  130. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  131. Type int64 `gorm:"column:type" json:"type" form:"type"`
  132. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  133. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  134. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  135. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  136. Number string `gorm:"column:number" json:"number" form:"number"`
  137. }
  138. func (DrugSalesReturnInfo) TableName() string {
  139. return "xt_drug_sales_return_info"
  140. }
  141. type DrugCancelStock struct {
  142. ID int64 `gorm:"column:id" json:"id" form:"id"`
  143. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  144. OperaTime int64 `gorm:"column:opera_time" json:"opera_time" form:"opera_time"`
  145. Total int64 `gorm:"column:total" json:"total" form:"total"`
  146. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  147. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  148. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  149. Status int64 `gorm:"column:status" json:"status" form:"status"`
  150. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  151. ReturnTime int64 `gorm:"column:return_time" json:"return_time" form:"return_time"`
  152. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  153. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  154. Type int64 `gorm:"column:type" json:"type" form:"type"`
  155. Manufacturers *Manufacturer `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
  156. Dealers *Dealers `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
  157. }
  158. func (DrugCancelStock) TableName() string {
  159. return "xt_drug_cancel_stock"
  160. }
  161. type DrugCancelStockInfo struct {
  162. ID int64 `gorm:"column:id" json:"id" form:"id"`
  163. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  164. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id" form:"cancel_stock_id"`
  165. Count int64 `gorm:"column:count" json:"count" form:"count"`
  166. Price float64 `gorm:"column:price" json:"price" form:"price"`
  167. Total float64 `gorm:"column:total" json:"total" form:"total"`
  168. ProductDate int64 `gorm:"column:product_date" json:"product_date" form:"product_date"`
  169. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date" form:"expiry_date"`
  170. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  171. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  172. Status int64 `gorm:"column:status" json:"status" form:"status"`
  173. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  174. OrderNumber string `gorm:"column:order_number" json:"order_number" form:"order_number"`
  175. Type int64 `gorm:"column:type" json:"type" form:"type"`
  176. Dealer int64 `gorm:"column:dealer" json:"dealer" form:"dealer"`
  177. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer" form:"manufacturer"`
  178. RetailPrice float64 `gorm:"column:retail_price" json:"retail_price" form:"retail_price"`
  179. RetailTotalPrice float64 `gorm:"column:retail_total_price" json:"retail_total_price" form:"retail_total_price"`
  180. Number string `gorm:"column:number" json:"number" form:"number"`
  181. }
  182. func (DrugCancelStockInfo) TableName() string {
  183. return "xt_drug_cancel_stock_info"
  184. }
  185. type DrugAutomaticReduceDetail struct {
  186. ID int64 `gorm:"column:id" json:"id" form:"id"`
  187. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id" form:"warehouse_out_id"`
  188. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number" form:"warehouse_out_order_number"`
  189. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  190. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  191. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  192. Status int64 `gorm:"column:status" json:"status" form:"status"`
  193. RecordTime int64 `gorm:"column:record_time" json:"record_time" form:"record_time"`
  194. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  195. DrugId int64 `gorm:"column:drug_id" json:"drug_id" form:"drug_id"`
  196. Count int64 `gorm:"column:count" json:"count" form:"count"`
  197. }
  198. func (DrugAutomaticReduceDetail) TableName() string {
  199. return "xt_drug_automatic_reduce_detail"
  200. }