stock_query_models.go 7.0KB

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