stock_query_models.go 6.8KB

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