hepa-calc-api/api/requests/OrderSingle.go
2024-08-23 17:23:29 +08:00

42 lines
2.2 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 requests
type OrderSingleRequest struct {
GetOrderSinglePage // 获取单项订单列表-分页
AddOrderSingle // 创建单项订单
GetOrderSinglePay // 获取单项订单支付数据
PutOrderSingleAnswer // 上传单项答案
}
// GetOrderSinglePage 获取单项订单列表-分页
type GetOrderSinglePage struct {
Page int `json:"page" form:"page" label:"页码"`
PageSize int `json:"page_size" form:"page_size" label:"每页个数"`
UserId int64 `json:"user_id" form:"user_id" label:"用户id"`
QuestionId string `json:"question_id" form:"question_id" label:"问题id"`
OrderStatus *int `json:"order_status" form:"order_status" label:"订单状态"`
PayChannel *int `json:"pay_channel" form:"pay_channel" label:"支付渠道"`
PayStatus *int `json:"pay_status" form:"pay_status" label:"支付状态"`
RefundStatus *int `json:"refund_status" form:"refund_status" label:"订单退款状态"`
OrderNo string `json:"order_no" form:"order_no" label:"系统订单编号"`
EscrowTradeNo string `json:"escrow_trade_no" form:"escrow_trade_no" label:"第三方支付流水号"`
CancelStatus *int `json:"cancel_status" form:"cancel_status" label:"取消状态"`
}
// AddOrderSingle 创建单项订单
type AddOrderSingle struct {
QuestionId string `json:"question_id" form:"question_id" label:"问题" validate:"required"`
UserCouponId string `json:"user_coupon_id" form:"user_coupon_id" label:"优惠卷"`
PayChannel int `json:"pay_channel" form:"pay_channel" label:"支付渠道" validate:"required,oneof=1 2 3"` // 支付渠道1:h5支付 2:app支付 3:会员支付)
OrderPrice *float64 `json:"order_price" form:"order_price" label:"订单金额"` // 订单金额
}
// GetOrderSinglePay 获取单项订单支付数据
type GetOrderSinglePay struct {
ClientType int `json:"client_type" form:"client_type" label:"客户端类型" validate:"required,oneof=1 2"` // 客户端类型1:h5 2:app
}
// PutOrderSingleAnswer 上传单项答案
type PutOrderSingleAnswer struct {
Answer string `json:"answer" form:"answer" label:"答案" validate:"required"`
}