Add forgot-password SMS reset, client/staff user lists, and regenerate Swagger.
Fold follow-up migrations into init, expose GET /users/clients and /users/staff, and refresh seed data. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,7 +3,8 @@ package auth
|
||||
import "time"
|
||||
|
||||
type LoginDTO struct {
|
||||
Email string `json:"email" binding:"required"`
|
||||
Name string `json:"name"`
|
||||
Phone string `json:"phone"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
}
|
||||
|
||||
@@ -47,6 +48,24 @@ type VerifyDTO struct {
|
||||
Code string `json:"code" binding:"required,len=6"`
|
||||
}
|
||||
|
||||
type ForgotPasswordDTO struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
}
|
||||
|
||||
type ResetPasswordDTO struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
Code string `json:"code" binding:"required,len=6"`
|
||||
Password string `json:"password" binding:"required,min=6"`
|
||||
PasswordConfirm string `json:"passwordConfirm" binding:"required"`
|
||||
}
|
||||
|
||||
type UserIdentity struct {
|
||||
Id int
|
||||
Name string
|
||||
Username string
|
||||
Phone string
|
||||
}
|
||||
|
||||
type RegisterResult struct {
|
||||
Phone string `json:"phone"`
|
||||
ExpiresIn int `json:"expiresIn"`
|
||||
|
||||
Reference in New Issue
Block a user