31 lines
686 B
Go
31 lines
686 B
Go
package rabbitmq_common_structure
|
|
|
|
type ProductsIncreaseSold struct {
|
|
ID uint `json:"id"` // 订单ID
|
|
ProductID uint `json:"product_id"` // 商品ID
|
|
}
|
|
|
|
// StockState 库存增减标识
|
|
type StockState = string
|
|
|
|
const (
|
|
StockStateIncrease StockState = "increase_inventory" //增加库存
|
|
StockStateDecrease StockState = "reduce_inventory" //减少库存
|
|
)
|
|
|
|
type ProductsChange struct {
|
|
OrderId int64 `json:"order_id"`
|
|
State StockState `json:"state"`
|
|
SkuItems []*SkuItem
|
|
}
|
|
|
|
type SkuItem struct {
|
|
SkuID uint `json:"sku_id"`
|
|
Num int `json:"num"`
|
|
Remark string `json:"remark"`
|
|
}
|
|
|
|
type ProductsStockWarn struct {
|
|
ID string `json:"id"` // skuID
|
|
}
|