初始化项目
This commit is contained in:
26
model/entity/order_paid.go
Normal file
26
model/entity/order_paid.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// OrderPaid 已支付订单
|
||||
// 对应MongoDB集合:orders_paid
|
||||
// 支付成功后订单进入此状态
|
||||
|
||||
type OrderPaid struct {
|
||||
OrderBase // 基础订单信息
|
||||
PayMethod string `bson:"pay_method" json:"pay_method"` // 支付方式:wechat/alipay
|
||||
PayType string `bson:"pay_type" json:"pay_type"` // 支付类型:native/jsapi/app/h5
|
||||
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
|
||||
|
||||
// 发货准备相关字段
|
||||
ReadyToShip bool `bson:"ready_to_ship" json:"ready_to_ship"` // 是否准备发货
|
||||
}
|
||||
Reference in New Issue
Block a user