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:
2026-08-14 16:42:47 +05:00
parent 5e3c46da83
commit 514b9ca5fc
24 changed files with 1477 additions and 473 deletions

View File

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