feat: add user register

This commit is contained in:
2025-12-17 20:43:08 +08:00
parent f86898ae5f
commit f0449bab25
9 changed files with 216 additions and 42 deletions

View File

@@ -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"`
}