Files
tyapi-server/internal/application/finance/dto/commands/finance_commands.go

39 lines
2.0 KiB
Go
Raw Normal View History

2025-07-13 16:36:20 +08:00
package commands
// CreateWalletCommand 创建钱包命令
type CreateWalletCommand struct {
2025-07-20 20:53:26 +08:00
UserID string `json:"user_id" binding:"required,uuid"`
2025-07-13 16:36:20 +08:00
}
2025-07-28 01:46:39 +08:00
// 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:"备注信息"`
2025-07-13 16:36:20 +08:00
}
2025-07-28 01:46:39 +08:00
// GiftRechargeCommand 赠送充值命令
type GiftRechargeCommand struct {
2025-12-12 15:27:15 +08:00
UserID string `json:"user_id" binding:"required,uuid"`
Amount string `json:"amount" binding:"required"`
Notes string `json:"notes" binding:"omitempty,max=500" comment:"备注信息"`
2025-07-13 16:36:20 +08:00
}
2025-07-28 01:46:39 +08:00
// CreateAlipayRechargeCommand 创建支付宝充值订单命令
type CreateAlipayRechargeCommand struct {
2025-12-12 15:27:15 +08:00
UserID string `json:"-"` // 用户ID从token获取
Amount string `json:"amount" binding:"required"` // 充值金额
Subject string `json:"-"` // 订单标题
2025-07-28 01:46:39 +08:00
Platform string `json:"platform" binding:"required,oneof=app h5 pc"` // 支付平台app/h5/pc
2025-07-13 16:36:20 +08:00
}
2025-12-12 15:27:15 +08:00
// 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
}