33 lines
1.4 KiB
Go
33 lines
1.4 KiB
Go
package entity
|
||
|
||
import (
|
||
"time"
|
||
)
|
||
|
||
// 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参数
|
||
}
|