package commands import ( "time" "github.com/shopspring/decimal" ) // CreateWalletCommand 创建钱包命令 type CreateWalletCommand struct { UserID string `json:"user_id" binding:"required,uuid"` } // UpdateWalletCommand 更新钱包命令 type UpdateWalletCommand struct { UserID string `json:"user_id" binding:"required,uuid"` Balance decimal.Decimal `json:"balance" binding:"omitempty"` IsActive *bool `json:"is_active"` } // RechargeWalletCommand 充值钱包命令 type RechargeWalletCommand struct { UserID string `json:"user_id" binding:"required,uuid"` Amount decimal.Decimal `json:"amount" binding:"required,gt=0"` } // RechargeCommand 充值命令 type RechargeCommand struct { UserID string `json:"user_id" binding:"required,uuid"` Amount decimal.Decimal `json:"amount" binding:"required,gt=0"` } // WithdrawWalletCommand 提现钱包命令 type WithdrawWalletCommand struct { UserID string `json:"user_id" binding:"required,uuid"` Amount decimal.Decimal `json:"amount" binding:"required,gt=0"` } // WithdrawCommand 提现命令 type WithdrawCommand struct { UserID string `json:"user_id" binding:"required,uuid"` Amount decimal.Decimal `json:"amount" binding:"required,gt=0"` } // CreateUserSecretsCommand 创建用户密钥命令 type CreateUserSecretsCommand struct { UserID string `json:"user_id" binding:"required,uuid"` ExpiresAt *time.Time `json:"expires_at" binding:"omitempty"` } // RegenerateAccessKeyCommand 重新生成访问密钥命令 type RegenerateAccessKeyCommand struct { UserID string `json:"user_id" binding:"required,uuid"` ExpiresAt *time.Time `json:"expires_at" binding:"omitempty"` } // DeactivateUserSecretsCommand 停用用户密钥命令 type DeactivateUserSecretsCommand struct { UserID string `json:"user_id" binding:"required,uuid"` } // WalletTransactionCommand 钱包交易命令 type WalletTransactionCommand struct { UserID string `json:"user_id" binding:"required,uuid"` FromUserID string `json:"from_user_id" binding:"required,uuid"` ToUserID string `json:"to_user_id" binding:"required,uuid"` Amount decimal.Decimal `json:"amount" binding:"required,gt=0"` Notes string `json:"notes" binding:"omitempty,max=200"` }