drug_stock.go 14KB

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