1234567891011121314151617181920212223242526272829 |
- package model
- import (
- "time"
- "go.mongodb.org/mongo-driver/bson/primitive"
- )
- // 订单管理
- type Order struct {
- Id primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
- UserId primitive.ObjectID `bson:"userId,omitempty" json:"userId"`
- Address *Address `bson:"address,omitempty" json:"address"`
- Product *OrderProduct `bson:"product,omitempty" json:"product"`
- DeliveryMethod string `bson:"deliveryMethod,omitempty" json:"deliveryMethod"`
- Remark string `bson:"remark,omitempty" json:"remark"`
- ExpressNo string `bson:"expressNo,omitempty" json:"expressNo"` // 快递单号,商家发货时需要输入
- Status int `bson:"status,omitempty" json:"status"` // 0:代发货 1:已发货
- CreateTime time.Time `bson:"createTime,omitempty" json:"createTime"`
- UpdateTime time.Time `bson:"updateTime,omitempty" json:"updateTime"`
- }
- type OrderProduct struct {
- Id primitive.ObjectID `bson:"id,omitempty" json:"id"`
- Size int `bson:"size,omitempty" json:"size"` // 下单选定的尺寸
- Color string `bson:"color,omitempty" json:"color"` // 下单选定的颜色
- Unit string `bson:"unit,omitempty" json:"unit"` // 型号
- Cover string `bson:"cover,omitempty" json:"cover"` // 封面图
- }
|