topfans/backend/gateway/dto/auth_sms_dto.go
2026-05-26 13:23:04 +08:00

30 lines
938 B
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有效期
}