Files
quyun-v2/backend/app/http/v1/dto/order.go
2026-01-17 21:06:02 +08:00

35 lines
918 B
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 dto
type OrderCreateForm struct {
// ContentID 内容ID。
ContentID int64 `json:"content_id"`
// Sku 规格标识(可选)。
Sku string `json:"sku"`
// Quantity 购买数量(默认 1
Quantity int `json:"quantity"`
// UserCouponID 用户券ID可选
UserCouponID int64 `json:"user_coupon_id"`
// IdempotencyKey 幂等键(同一业务请求需保持一致)。
IdempotencyKey *string `json:"idempotency_key"`
}
type OrderCreateResponse struct {
// OrderID 创建成功的订单ID。
OrderID int64 `json:"order_id"`
}
type OrderPayForm struct {
// Method 支付方式alipay/balance
Method string `json:"method"`
}
type OrderPayResponse struct {
// PayParams 支付参数(透传给前端)。
PayParams string `json:"pay_params"`
}
type OrderStatusResponse struct {
// Status 订单状态unpaid/paid/completed 等)。
Status string `json:"status"`
}