stock_query_models.go 6.6KB

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