stock_query_models.go 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. package models
  2. type StockInfo struct {
  3. ID int64 `gorm:"column:id" json:"id"`
  4. GoodCode string `gorm:"column:good_code" json:"good_code"`
  5. GoodName string `gorm:"column:good_name" json:"good_name"`
  6. SpecificationName string `gorm:"column:specification_name" json:"specification_name"`
  7. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  8. GoodUnit int64 `gorm:"column:good_unit" json:"good_unit"`
  9. QueryWarehousingInfo []QueryWarehousingInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"query_warehousing_info"`
  10. QuerySalesReturnInfo []QuerySalesReturnInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"query_sales_return_info"`
  11. QueryWarehouseOutInfo []QueryWarehouseOutInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"query_warehouseout_info"`
  12. QueryCancelStockInfo []QueryCancelStockInfo `gorm:"ForeignKey:GoodId;AssociationForeignKey:ID" json:"query_cancel_stock_info"`
  13. GoodsType GoodsType `gorm:"ForeignKey:GoodTypeId;AssociationForeignKey:ID" json:"type"`
  14. }
  15. func (StockInfo) TableName() string {
  16. return "xt_good_information"
  17. }
  18. type QueryWarehousingInfo struct {
  19. ID int64 `gorm:"column:id" json:"id"`
  20. WarehousingId int64 `gorm:"column:warehousing_id" json:"warehousing_id"`
  21. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  22. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  23. Number string `gorm:"column:number" json:"number"`
  24. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  25. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  26. WarehousingCount int64 `gorm:"column:warehousing_count" json:"warehousing_count"`
  27. Price float64 `gorm:"column:price" json:"price"`
  28. TotalPrice float64 `gorm:"column:total_price" json:"total_price"`
  29. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  30. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  31. Remark string `gorm:"column:remark" json:"remark"`
  32. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  33. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  34. Status int64 `gorm:"column:status" json:"status"`
  35. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  36. IsReturn int64 `gorm:"column:is_return" json:"is_return"`
  37. WarehousingOrder string `gorm:"column:warehousing_order" json:"warehousing_order"`
  38. Type int64 `gorm:"column:type" json:"type"`
  39. }
  40. func (QueryWarehousingInfo) TableName() string {
  41. return "xt_warehouse_info"
  42. }
  43. type QueryWarehouseOutInfo struct {
  44. ID int64 `gorm:"column:id" json:"id"`
  45. WarehouseOutId int64 `gorm:"column:warehouse_out_id" json:"warehouse_out_id"`
  46. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  47. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  48. WarehousingOutTarget int64 `gorm:"column:warehousing_out_target" json:"warehousing_out_target"`
  49. Count int64 `gorm:"column:count" json:"count"`
  50. Price float64 `gorm:"column:price" json:"price"`
  51. TotalPrice float64 `gorm:"column:total_price" json:"total_price"`
  52. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  53. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  54. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  55. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  56. Status int64 `gorm:"column:status" json:"status"`
  57. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  58. Remark string `gorm:"column:remark" json:"remark"`
  59. IsCancel int64 `gorm:"column:is_cancel" json:"is_cancel"`
  60. WarehouseOutOrderNumber string `gorm:"column:warehouse_out_order_number" json:"warehouse_out_order_number"`
  61. Type int64 `gorm:"column:type" json:"type"`
  62. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  63. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  64. IsSys int64 `gorm:"column:is_sys" json:"is_sys"`
  65. SysRecordTime int64 `gorm:"column:sys_record_time" json:"sys_record_time"`
  66. }
  67. func (QueryWarehouseOutInfo) TableName() string {
  68. return "xt_warehouse_out_info"
  69. }
  70. type QuerySalesReturnInfo struct {
  71. ID int64 `gorm:"column:id" json:"id"`
  72. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  73. SalesReturnId int64 `gorm:"column:sales_return_id" json:"sales_return_id"`
  74. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  75. Count int64 `gorm:"column:count" json:"count"`
  76. Price float64 `gorm:"column:price" json:"price"`
  77. Total float64 `gorm:"column:total" json:"total"`
  78. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  79. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  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. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  85. Type int64 `gorm:"column:type" json:"type"`
  86. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  87. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  88. }
  89. func (QuerySalesReturnInfo) TableName() string {
  90. return "xt_sales_return_info"
  91. }
  92. type QueryCancelStockInfo struct {
  93. ID int64 `gorm:"column:id" json:"id"`
  94. GoodId int64 `gorm:"column:good_id" json:"good_id"`
  95. CancelStockId int64 `gorm:"column:cancel_stock_id" json:"cancel_stock_id"`
  96. GoodTypeId int64 `gorm:"column:good_type_id" json:"good_type_id"`
  97. Count int64 `gorm:"column:count" json:"count"`
  98. Price float64 `gorm:"column:price" json:"price"`
  99. Total float64 `gorm:"column:total" json:"total"`
  100. ProductDate int64 `gorm:"column:product_date" json:"product_date"`
  101. ExpiryDate int64 `gorm:"column:expiry_date" json:"expiry_date"`
  102. Ctime int64 `gorm:"column:ctime" json:"ctime"`
  103. Mtime int64 `gorm:"column:mtime" json:"mtime"`
  104. Status int64 `gorm:"column:status" json:"status"`
  105. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  106. OrderNumber string `gorm:"column:order_number" json:"order_number"`
  107. Type int64 `gorm:"column:type" json:"type"`
  108. Dealer int64 `gorm:"column:dealer" json:"dealer"`
  109. Manufacturer int64 `gorm:"column:manufacturer" json:"manufacturer"`
  110. }
  111. func (QueryCancelStockInfo) TableName() string {
  112. return "xt_cancel_stock_info"
  113. }