gomod引用
This commit is contained in:
@@ -31,12 +31,21 @@ type OrderBase struct {
|
||||
// 按状态拆分的订单表会包含这个结构
|
||||
|
||||
type OrderItem struct {
|
||||
ProductID string `bson:"product_id" json:"product_id"` // 商品ID
|
||||
ProductName string `bson:"product_name" json:"product_name"` // 商品名称
|
||||
Price int64 `bson:"price" json:"price"` // 单价(分)
|
||||
Quantity int `bson:"quantity" json:"quantity"` // 数量
|
||||
TotalPrice int64 `bson:"total_price" json:"total_price"` // 小计(分)
|
||||
ImageURL string `bson:"image_url,omitempty" json:"image_url"` // 商品图片
|
||||
AssetID string `bson:"asset_id" json:"asset_id"` // 资产ID
|
||||
AssetName string `bson:"asset_name" json:"asset_name"` // 资产名称
|
||||
AssetType string `bson:"asset_type" json:"asset_type"` // 资产类型:product-商品型,service-服务型,software-软件型
|
||||
ImageURL string `bson:"image_url,omitempty" json:"image_url"` // 资产图片
|
||||
Quantity int `bson:"quantity" json:"quantity"` // 总数量
|
||||
TotalPrice int64 `bson:"total_price" json:"total_price"` // 小计(分)
|
||||
Stocks []OrderItemStock `bson:"stocks" json:"stocks"` // 库存项列表
|
||||
}
|
||||
|
||||
// OrderItemStock 订单商品项库存明细
|
||||
// 用于追溯具体使用了哪些库存项,一个库存项只会有一个实例
|
||||
type OrderItemStock struct {
|
||||
StockID string `bson:"stock_id" json:"stock_id"` // 库存ID
|
||||
Price int64 `bson:"price" json:"price"` // 该库存项的单价(分)
|
||||
StockAttrs map[string]interface{} `bson:"stock_attrs,omitempty" json:"stock_attrs"` // 库存项属性(动态字段,存储该库存项的具体规格属性)
|
||||
}
|
||||
|
||||
// ShippingInfo 收货信息
|
||||
|
||||
Reference in New Issue
Block a user