chore: document v1 dto fields
This commit is contained in:
@@ -1,24 +1,32 @@
|
||||
package dto
|
||||
|
||||
type OrderCreateForm struct {
|
||||
ContentID int64 `json:"content_id"`
|
||||
Sku string `json:"sku"`
|
||||
Quantity int `json:"quantity"`
|
||||
UserCouponID int64 `json:"user_coupon_id"`
|
||||
// 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"`
|
||||
}
|
||||
|
||||
type OrderCreateResponse struct {
|
||||
// OrderID 创建成功的订单ID。
|
||||
OrderID int64 `json:"order_id"`
|
||||
}
|
||||
|
||||
type OrderPayForm struct {
|
||||
Method string `json:"method"` // wechat, alipay, balance
|
||||
// Method 支付方式(wechat/alipay/balance)。
|
||||
Method string `json:"method"`
|
||||
}
|
||||
|
||||
type OrderPayResponse struct {
|
||||
// PayParams 支付参数(透传给前端)。
|
||||
PayParams string `json:"pay_params"`
|
||||
}
|
||||
|
||||
type OrderStatusResponse struct {
|
||||
Status string `json:"status"` // unpaid, paid, completed
|
||||
// Status 订单状态(unpaid/paid/completed 等)。
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user