stock_models.go 17KB

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