32 lines
1.4 KiB
Go
32 lines
1.4 KiB
Go
|
|
package entity
|
|||
|
|
|
|||
|
|
import (
|
|||
|
|
"time"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
// OrderShipped 已发货订单
|
|||
|
|
// 对应MongoDB集合:orders_shipped
|
|||
|
|
// 发货后订单进入此状态
|
|||
|
|
|
|||
|
|
type OrderShipped struct {
|
|||
|
|
OrderBase // 基础订单信息
|
|||
|
|
PayMethod string `bson:"pay_method" json:"pay_method"` // 支付方式:wechat/alipay
|
|||
|
|
OrderItems []OrderItem `bson:"order_items" json:"order_items"` // 订单商品列表
|
|||
|
|
ShippingInfo *ShippingInfo `bson:"shipping_info,omitempty" json:"shipping_info"` // 收货信息
|
|||
|
|
|
|||
|
|
// 支付成功信息
|
|||
|
|
PaidAt time.Time `bson:"paid_at" json:"paid_at"` // 支付时间
|
|||
|
|
TransactionID string `bson:"transaction_id" json:"transaction_id"` // 支付平台交易号
|
|||
|
|
TradeNo string `bson:"trade_no" json:"trade_no"` // 交易号
|
|||
|
|
PaymentChannel string `bson:"payment_channel" json:"payment_channel"` // 支付渠道:wechat/alipay
|
|||
|
|
|
|||
|
|
// 发货特有字段
|
|||
|
|
ShippedAt time.Time `bson:"shipped_at" json:"shipped_at"` // 发货时间
|
|||
|
|
ExpressCompany string `bson:"express_company" json:"express_company"` // 快递公司
|
|||
|
|
ExpressNo string `bson:"express_no" json:"express_no"` // 快递单号
|
|||
|
|
ShippingCost int64 `bson:"shipping_cost" json:"shipping_cost"` // 运费(分)
|
|||
|
|
|
|||
|
|
// 收货相关字段
|
|||
|
|
ExpectedArrival time.Time `bson:"expected_arrival,omitempty" json:"expected_arrival"` // 预计到达时间
|
|||
|
|
}
|