topfans/backend/gateway/dto/auth_sms_dto.go
2026-07-09 19:00:03 +08:00

42 lines
1.3 KiB
Go
Raw 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 dto
// SendCodeRequest 发送验证码请求
type SendCodeRequest struct {
Mobile string `json:"mobile" binding:"required"`
Scene string `json:"scene" binding:"required"` // register, password
}
// SendCodeResponse 发送验证码响应
type SendCodeResponse struct {
Code int `json:"code"`
Message string `json:"message"`
ExpiresIn int `json:"expires_in"` // 多少秒后可以重发
}
// VerifyCodeRequest 验证验证码请求
type VerifyCodeRequest struct {
Mobile string `json:"mobile" binding:"required"`
Code string `json:"code" binding:"required"`
Scene string `json:"scene" binding:"required"`
}
// VerifyCodeResponse 验证验证码响应
type VerifyCodeResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Verified bool `json:"verified"`
VerifyToken string `json:"verify_token"`
ExpiresIn int `json:"expires_in"` // token有效期
}
// ResetPasswordRequest 匿名重置密码请求(忘记密码场景)
type ResetPasswordRequest struct {
Mobile string `json:"mobile" binding:"required,len=11"`
NewPassword string `json:"new_password" binding:"required,min=6"`
VerifyToken string `json:"verify_token" binding:"required"`
}
// ResetPasswordResponse 匿名重置密码响应(空,业务码通过 Base 表达)
type ResetPasswordResponse struct {
}