Files
order/model/entity/order_pending.go
2025-12-10 13:51:09 +08:00

29 lines
1.4 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package entity
// OrderPending 待支付订单
// 对应MongoDB集合orders_pending
// 订单创建后进入此状态
type OrderPending 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"` // 收货信息
// 支付相关字段
PayInfo PayInfo `bson:"pay_info" json:"pay_info"` // 支付信息
}
// PayInfo 支付信息(待支付订单特有)
// 包含支付二维码、支付链接等
type PayInfo struct {
OutTradeNo string `bson:"out_trade_no" json:"out_trade_no"` // 商户订单号
QRCode string `bson:"qrcode,omitempty" json:"qrcode"` // 支付二维码
PayURL string `bson:"pay_url,omitempty" json:"pay_url"` // 支付链接
PrepayID string `bson:"prepay_id,omitempty" json:"prepay_id"` // 预支付ID微信
JSAPIParams string `bson:"jsapi_params,omitempty" json:"jsapi_params"` // JSAPI参数
APPParams string `bson:"app_params,omitempty" json:"app_params"` // APP参数
}