feat: add user register
This commit is contained in:
@@ -14,7 +14,8 @@ type PhoneLoginRequest struct {
|
||||
}
|
||||
|
||||
type PhoneLoginResponse struct {
|
||||
Token string `json:"token"`
|
||||
Token string `json:"token"`
|
||||
ExpiresAt int64 `json:"expires_at"`
|
||||
}
|
||||
|
||||
type UserInfoResponse struct {
|
||||
@@ -22,3 +23,23 @@ type UserInfoResponse struct {
|
||||
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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user