stock_models.go 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. package models
  2. type Manufacturer struct {
  3. ID int64 `gorm:"column:id" json:"id"`
  4. ManufacturerName string `gorm:"column:manufacturer_name" json:"manufacturer_name"`
  5. Contact string `gorm:"column:contact" json:"contact"`
  6. ContactPhone string `gorm:"column:contact_phone" json:"contact_phone"`
  7. PlatformNumber string `gorm:"column:platform_number" json:"platform_number"`
  8. Email string `gorm:"column:email" json:"email"`
  9. ContactAddress string `gorm:"column:contact_address" json:"contact_address"`
  10. Remark string `gorm:"column:remark" json:"remark"`
  11. Creater int64 `gorm:"column:creater" json:"creater"`
  12. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  13. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  14. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  15. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  16. Status int64 `gorm:"column:status" json:"status"`
  17. ManufacturerCode string `gorm:"column:manufacturer_code" json:"manufacturer_code"`
  18. }
  19. func (Manufacturer) TableName() string {
  20. return "xt_manufacturer"
  21. }
  22. type Dealer struct {
  23. ID int64 `gorm:"column:id" json:"id"`
  24. DealerName string `gorm:"column:dealer_name" json:"dealer_name"`
  25. Contact string `gorm:"column:contact" json:"contact"`
  26. ContactPhone string `gorm:"column:contact_phone" json:"contact_phone"`
  27. PlatformNumber string `gorm:"column:platform_number" json:"platform_number"`
  28. Email string `gorm:"column:email" json:"email"`
  29. ContactAddress string `gorm:"column:contact_address" json:"contact_address"`
  30. Remark string `gorm:"column:remark" json:"remark"`
  31. Creater int64 `gorm:"column:creater" json:"creater"`
  32. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  33. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  34. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  35. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  36. Status int64 `gorm:"column:status" json:"status"`
  37. DealerCode string `gorm:"column:dealer_code" json:"dealer_code"`
  38. }
  39. func (Dealer) TableName() string {
  40. return "xt_dealer"
  41. }
  42. type Warehousing struct {
  43. ID int64 `gorm:"column:id" json:"id"`
  44. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order"`
  45. OperationTime int64 `gorm:"column:operation_time" json:"operation_time"`
  46. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  47. Creater int64 `gorm:"column:creater" json:"creater"`
  48. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  49. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  50. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  51. Status int64 `gorm:"column:status" json:"status"`
  52. WarehousingTime int64 `gorm:"column:warehousing_time" json:"warehousing_time"`
  53. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  54. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  55. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  56. Dealers Dealer `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  57. Type int64 `gorm:"column:type" json:"type"`
  58. }
  59. func (Warehousing) TableName() string {
  60. return "xt_warehouse"
  61. }
  62. type WarehousingInfo struct {
  63. ID int64 `gorm:"column:id" json:"id"`
  64. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id"`
  65. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  66. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  67. Number string `gorm:"column:number" json:"number"`
  68. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  69. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  70. WarehousingCount int64 `gorm:"column:warehousing_count" json:"warehousing_count"`
  71. Price float64 `gorm:"column:price" json:"price"`
  72. TotalPrice float64 `gorm:"column:total_price" json:"total_price"`
  73. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  74. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  75. Remark string `gorm:"column:remark" json:"remark"`
  76. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  77. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  78. Status int64 `gorm:"column:status" json:"status"`
  79. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  80. IsReturn int64 `gorm:"column:is_return" json:"is_return"`
  81. Warehousing Warehousing `ForeignKey:WarehousingId json:"warehouse"`
  82. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order"`
  83. GoodInfo GoodInfo `gorm:"ForeignKey:ID;AssociationForeignKey:GoodId" `
  84. Type int64 `gorm:"column:type" json:"type"`
  85. }
  86. func (WarehousingInfo) TableName() string {
  87. return "xt_warehouse_info"
  88. }
  89. type WarehouseOut struct {
  90. ID int64 `gorm:"column:id" json:"id"`
  91. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number"`
  92. OperationTime int64 `gorm:"column:operation_time" json:"operation_time"`
  93. Creater int64 `gorm:"column:creater" json:"creater"`
  94. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  95. Modifier int64 `gorm:"column:modifier" json:"modifier"`
  96. Remark string `gorm:"column:remark" json:"remark"`
  97. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  98. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  99. Status int64 `gorm:"column:status" json:"status"`
  100. WarehouseOutTime int64 `gorm:"column:warehouse_out_time" json:"warehouse_out_time"`
  101. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  102. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  103. Manufacturers Manufacturer `gorm:"ForeignKey:ID;AssociationForeignKey:Manufacturer" json:"Manufacturer"`
  104. Dealers Dealer `gorm:"ForeignKey:ID;AssociationForeignKey:Dealer" json:"Dealer"`
  105. Type int64 `gorm:"column:type" json:"type"`
  106. IsSys int64 `gorm:"column:is_sys" json:"is_sys"`
  107. }
  108. func (WarehouseOut) TableName() string {
  109. return "xt_warehouse_out"
  110. }
  111. type WarehouseOutInfo struct {
  112. ID int64 `gorm:"column:id" json:"id"`
  113. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id"`
  114. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  115. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  116. WarehousingOutTarget int64 `gorm:"column:warehousing_out_target" json:"warehousing_out_target"`
  117. Count int64 `gorm:"column:count" json:"count"`
  118. Price float64 `gorm:"column:price" json:"price"`
  119. TotalPrice float64 `gorm:"column:total_price" json:"total_price"`
  120. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  121. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  122. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  123. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  124. Status int64 `gorm:"column:status" json:"status"`
  125. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  126. Remark string `gorm:"column:remark" json:"remark"`
  127. IsCancel int64 `gorm:"column:is_cancel" json:"is_cancel"`
  128. WarehouseOut WarehouseOut `ForeignKey:WarehouseOutId json:"WarehouseOut"`
  129. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number"`
  130. GoodInfo GoodInfo `gorm:"ForeignKey:ID;AssociationForeignKey:GoodId" `
  131. Type int64 `gorm:"column:type" json:"type"`
  132. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  133. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  134. IsSys int64 `gorm:"column:is_sys" json:"is_sys"`
  135. SysRecordTime int64 `gorm:"column:sys_record_time" json:"sys_record_time"`
  136. }
  137. func (WarehouseOutInfo) TableName() string {
  138. return "xt_warehouse_out_info"
  139. }
  140. type SalesReturn 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. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  152. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  153. Type int64 `gorm:"column:type" json:"type"`
  154. }
  155. func (SalesReturn) TableName() string {
  156. return "xt_sales_return"
  157. }
  158. type SalesReturnInfo struct {
  159. ID int64 `gorm:"column:id" json:"id"`
  160. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  161. SalesReturnId int64 `gorm:"column:sales_return_id" json:"sales_return_id"`
  162. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  163. Count int64 `gorm:"column:count" json:"count"`
  164. Price float64 `gorm:"column:price" json:"price"`
  165. Total float64 `gorm:"column:total" json:"total"`
  166. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  167. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  168. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  169. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  170. Status int64 `gorm:"column:status" json:"status"`
  171. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  172. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  173. Type int64 `gorm:"column:type" json:"type"`
  174. SalesReturn SalesReturn `ForeignKey:SalesReturnId json:"SalesReturn"`
  175. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  176. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  177. }
  178. func (SalesReturnInfo) TableName() string {
  179. return "xt_sales_return_info"
  180. }
  181. type CancelStockInfo struct {
  182. ID int64 `gorm:"column:id" json:"id"`
  183. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  184. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
  185. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  186. Count int64 `gorm:"column:count" json:"count"`
  187. Price float64 `gorm:"column:price" json:"price"`
  188. Total float64 `gorm:"column:total" json:"total"`
  189. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  190. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  191. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  192. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  193. Status int64 `gorm:"column:status" json:"status"`
  194. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  195. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  196. Type int64 `gorm:"column:type" json:"type"`
  197. CancelStock CancelStock `ForeignKey:CancelStockId json:"CancelStock"`
  198. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  199. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  200. }
  201. func (CancelStockInfo) TableName() string {
  202. return "xt_cancel_stock_info"
  203. }
  204. type CancelStock struct {
  205. ID int64 `gorm:"column:id" json:"id"`
  206. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  207. OperaTime int64 `gorm:"column:opera_time" json:"opera_time"`
  208. Total int64 `gorm:"column:total" json:"total"`
  209. Creater int64 `gorm:"column:creater" json:"creater"`
  210. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  211. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  212. Status int64 `gorm:"column:status" json:"status"`
  213. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  214. ReturnTime int64 `gorm:"column:return_time" json:"return_time"`
  215. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  216. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  217. Type int64 `gorm:"column:type" json:"type"`
  218. }
  219. func (CancelStock) TableName() string {
  220. return "xt_cancel_stock"
  221. }
  222. type WarehousingGoodInfo struct {
  223. ID int64 `gorm:"column:id" json:"id"`
  224. GoodCode string `gorm:"column:good_code" json:"good_code"`
  225. SpecificationName string `gorm:"column:specification_name" json:"specification_name"`
  226. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  227. GoodUnit int64 `gorm:"column:good_unit" json:"good_unit"`
  228. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  229. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  230. Status int64 `gorm:"column:status" json:"status"`
  231. GoodsType GoodsType `gorm:"ForeignKey:ID;AssociationForeignKey:GoodTypeId" json:"type"`
  232. Manufacturers Manufacturer `gorm:"ForeignKey:Manufacturer;AssociationForeignKey:ID" json:"manufacturers"`
  233. Dealers Dealer `gorm:"ForeignKey:Dealer;AssociationForeignKey:ID" json:"dealers"`
  234. BuyPrice float64 `gorm:"column:buy_price" json:"buy_price"`
  235. }
  236. func (WarehousingGoodInfo) TableName() string {
  237. return "xt_good_information"
  238. }
  239. type WarehousingInfoConfig struct {
  240. ID int64 `gorm:"column:id" json:"id"`
  241. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id"`
  242. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  243. WarehousingGoodInfo WarehousingGoodInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"info"`
  244. }
  245. func (WarehousingInfoConfig) TableName() string {
  246. return "xt_warehouse_info"
  247. }
  248. type WarehousingOutInfoConfig struct {
  249. ID int64 `gorm:"column:id" json:"id"`
  250. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id"`
  251. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  252. WarehousingGoodInfo WarehousingGoodInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"info"`
  253. }
  254. func (WarehousingOutInfoConfig) TableName() string {
  255. return "xt_warehouse_out_info"
  256. }
  257. type AutomaticReduceDetail struct {
  258. ID int64 `gorm:"column:id" json:"id"`
  259. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id"`
  260. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number"`
  261. PatientId int64 `gorm:"column:patient_id" json:"patient_id"`
  262. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  263. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  264. Status int64 `gorm:"column:status" json:"status"`
  265. RecordTime int64 `gorm:"column:record_time" json:"record_time"`
  266. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  267. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  268. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  269. GoodInfo GoodInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"info"`
  270. GoodsType GoodsType `gorm:"ForeignKey:GoodTypeId;AssociationForeignKey:ID" json:"type"`
  271. Patients Patients `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"user"`
  272. }
  273. func (AutomaticReduceDetail) TableName() string {
  274. return "xt_automatic_reduce_detail"
  275. }