Files
order/model/entity/order_paid.go
2025-12-10 09:02:41 +08:00

27 lines
1.2 KiB
Go
Raw 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
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"` // 是否准备发货
}