stock_query_models.go 7.2KB

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