Add phone registration with SMS verification and regenerate Swagger docs.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
704606b3f5
commit
5e3c46da83
17 files changed
+1008
-20
No files matched your search
@@ -33,3 +33,32 @@ type UserCredentials struct {
|
||||
Id int
|
||||
Password string
|
||||
}
|
||||
|
||||
type RegisterDTO struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
Phone string `json:"phone" binding:"required"`
|
||||
Username string `json:"username" binding:"required,min=3"`
|
||||
Password string `json:"password" binding:"required,min=6"`
|
||||
PasswordConfirm string `json:"passwordConfirm" binding:"required"`
|
||||
}
|
||||
|
||||
type VerifyDTO struct {
|
||||
Phone string `json:"phone" binding:"required"`
|
||||
Code string `json:"code" binding:"required,len=6"`
|
||||
}
|
||||
|
||||
type RegisterResult struct {
|
||||
Phone string `json:"phone"`
|
||||
ExpiresIn int `json:"expiresIn"`
|
||||
}
|
||||
|
||||
type Verification struct {
|
||||
ID int64
|
||||
Name string
|
||||
Username string
|
||||
Phone string
|
||||
Password string
|
||||
CodeHash string
|
||||
Attempts int
|
||||
ExpiresAt time.Time
|
||||
}
|
||||
Reference in new issue
Block a user