46 lines
1.0 KiB
Go
46 lines
1.0 KiB
Go
package model
|
|
|
|
type SmsSendRequest struct {
|
|
Phone string `json:"phone" binding:"required"`
|
|
}
|
|
|
|
type SmsSendResponse struct {
|
|
Code string `json:"code"`
|
|
}
|
|
|
|
type PhoneLoginRequest struct {
|
|
Phone string `json:"phone" binding:"required"`
|
|
Code string `json:"code" binding:"required"`
|
|
}
|
|
|
|
type PhoneLoginResponse struct {
|
|
Token string `json:"token"`
|
|
ExpiresAt int64 `json:"expires_at"`
|
|
}
|
|
|
|
type UserInfoResponse struct {
|
|
Username string `json:"username"`
|
|
Phone string `json:"phone"`
|
|
Status int `json:"status"` // 0: not login, 1: login
|
|
}
|
|
|
|
type EmailRegisterRequest struct {
|
|
Email string `json:"email" binding:"required,email"`
|
|
Password string `json:"password" binding:"required,min=6"`
|
|
}
|
|
|
|
type EmailRegisterResponse struct {
|
|
Token string `json:"token"`
|
|
ExpiresAt int64 `json:"expires_at"`
|
|
}
|
|
|
|
type EmailLoginRequest struct {
|
|
Email string `json:"email" binding:"required,email"`
|
|
Password string `json:"password" binding:"required"`
|
|
}
|
|
|
|
type EmailLoginResponse struct {
|
|
Token string `json:"token"`
|
|
ExpiresAt int64 `json:"expires_at"`
|
|
}
|