小程序一些功能更新
This commit is contained in:
@@ -9,25 +9,31 @@ import "github.com/gogf/gf/v2/os/gtime"
|
||||
// - OrderTypeMember(1):会员套餐。发货 = 延长 users.level_expire_at(用到 LevelKey/DurationDays)
|
||||
// - OrderTypeQuota(2) :次数包。 发货 = 增加 user_tool_quota 余额(用到 ToolKey/Times/DurationDays 作为有效期天数)
|
||||
type MemberOrders struct {
|
||||
Id int64 `json:"id"`
|
||||
OutTradeNo string `json:"out_trade_no"` // 业务单号,唯一,8-32 位且不能以下划线开头
|
||||
WxOrderId string `json:"wx_order_id"` // 平台单号,发货幂等去重以此为准
|
||||
UserId int64 `json:"user_id"`
|
||||
Openid string `json:"openid"` // 支付时使用的 openid,查单需要
|
||||
OrderType int `json:"order_type"`
|
||||
PlanKey string `json:"plan_key"`
|
||||
PackKey string `json:"pack_key"` // 次数包档位(OrderType=2)
|
||||
ToolKey string `json:"tool_key"` // 次数包绑定的工具(OrderType=2)
|
||||
Times int `json:"times"` // 次数包的次数(OrderType=2)
|
||||
ProductId string `json:"product_id"`
|
||||
PriceCents int64 `json:"price_cents"`
|
||||
LevelKey string `json:"level_key"` // 下单时套餐对应的等级(快照)
|
||||
DurationDays int `json:"duration_days"` // 下单时套餐天数 / 次数包有效期天数(快照)
|
||||
Status int `json:"status"`
|
||||
PayChannel string `json:"pay_channel"`
|
||||
Attach string `json:"attach"` // 透传数据,发货时原样回传
|
||||
PaidAt *gtime.Time `json:"paid_at"`
|
||||
DeliveredAt *gtime.Time `json:"delivered_at"`
|
||||
CreatedAt *gtime.Time `json:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updated_at"`
|
||||
Id int64 `json:"id"`
|
||||
OutTradeNo string `json:"out_trade_no"` // 业务单号,唯一,8-32 位且不能以下划线开头
|
||||
WxOrderId string `json:"wx_order_id"` // 平台单号,发货幂等去重以此为准
|
||||
UserId int64 `json:"user_id"`
|
||||
Openid string `json:"openid"` // 支付时使用的 openid,查单需要
|
||||
OrderType int `json:"order_type"`
|
||||
PlanKey string `json:"plan_key"`
|
||||
PackKey string `json:"pack_key"` // 次数包档位(OrderType=2)
|
||||
ToolKey string `json:"tool_key"` // 次数包绑定的工具(OrderType=2)
|
||||
Times int `json:"times"` // 次数包的次数(OrderType=2)
|
||||
ProductId string `json:"product_id"`
|
||||
PriceCents int64 `json:"price_cents"`
|
||||
LevelKey string `json:"level_key"` // 下单时套餐对应的等级(快照)
|
||||
DurationDays int `json:"duration_days"` // 下单时套餐天数 / 次数包有效期天数(快照)
|
||||
Status int `json:"status"`
|
||||
PayChannel string `json:"pay_channel"`
|
||||
Attach string `json:"attach"` // 透传数据,发货时原样回传
|
||||
// ===== 退款(refund_status 独立于 status:status 仍由订单生命周期驱动)=====
|
||||
RefundNo string `json:"refund_no"` // 商户退款单号(唯一,重试会换新号)
|
||||
RefundStatus int `json:"refund_status"` // 0未退款 1退款中 2退款成功 3退款失败
|
||||
RefundAmount int64 `json:"refund_amount"` // 退款金额(分,全额退款)
|
||||
RefundReason string `json:"refund_reason"` // 退款原因(后台登记)
|
||||
RefundFinishedAt *gtime.Time `json:"refund_finished_at"` // 退款确认完成时间(回调/查单/手工登记)
|
||||
PaidAt *gtime.Time `json:"paid_at"`
|
||||
DeliveredAt *gtime.Time `json:"delivered_at"`
|
||||
CreatedAt *gtime.Time `json:"created_at"`
|
||||
UpdatedAt *gtime.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user