39 lines
2.0 KiB
Go
39 lines
2.0 KiB
Go
package commands
|
||
|
||
// CreateWalletCommand 创建钱包命令
|
||
type CreateWalletCommand struct {
|
||
UserID string `json:"user_id" binding:"required,uuid"`
|
||
}
|
||
|
||
// TransferRechargeCommand 对公转账充值命令
|
||
type TransferRechargeCommand struct {
|
||
UserID string `json:"user_id" binding:"required,uuid"`
|
||
Amount string `json:"amount" binding:"required"`
|
||
TransferOrderID string `json:"transfer_order_id" binding:"required" comment:"转账订单号"`
|
||
Notes string `json:"notes" binding:"omitempty,max=500" comment:"备注信息"`
|
||
}
|
||
|
||
// GiftRechargeCommand 赠送充值命令
|
||
type GiftRechargeCommand struct {
|
||
UserID string `json:"user_id" binding:"required,uuid"`
|
||
Amount string `json:"amount" binding:"required"`
|
||
Notes string `json:"notes" binding:"omitempty,max=500" comment:"备注信息"`
|
||
}
|
||
|
||
// CreateAlipayRechargeCommand 创建支付宝充值订单命令
|
||
type CreateAlipayRechargeCommand struct {
|
||
UserID string `json:"-"` // 用户ID(从token获取)
|
||
Amount string `json:"amount" binding:"required"` // 充值金额
|
||
Subject string `json:"-"` // 订单标题
|
||
Platform string `json:"platform" binding:"required,oneof=app h5 pc"` // 支付平台:app/h5/pc
|
||
}
|
||
|
||
// CreateWechatRechargeCommand 创建微信充值订单命令
|
||
type CreateWechatRechargeCommand struct {
|
||
UserID string `json:"-"` // 用户ID(从token获取)
|
||
Amount string `json:"amount" binding:"required"` // 充值金额
|
||
Subject string `json:"-"` // 订单标题
|
||
Platform string `json:"platform" binding:"required,oneof=wx_native native wx_h5 h5"` // 仅支持微信Native扫码,兼容传入native/wx_h5/h5
|
||
OpenID string `json:"openid" binding:"omitempty"` // 前端可直接传入的 openid(用于小程序/H5)
|
||
}
|