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