feat: add challenge to auth service

This commit is contained in:
2025-09-06 17:04:17 +03:30
parent 7e471fd8d9
commit 723d883bc2
7 changed files with 165 additions and 19 deletions
+15 -2
View File
@@ -2,14 +2,21 @@ package types
import (
"backend/internal/domain"
"time"
)
type User struct {
Base
Name string
LastName string
PubKey string
Name string
LastName string
//TODO: add Kyc Embedded struct
//TODO: add NFT Embedded struct
Phone string
NationalID string
LastLogin *time.Time
Email *string
BirthDate *time.Time
}
func CastUserToStorage(u domain.User) *User {
@@ -24,6 +31,9 @@ func CastUserToStorage(u domain.User) *User {
LastName: u.LastName,
Phone: u.PhoneNumber,
NationalID: u.NationalID,
Email: u.Email,
BirthDate: u.BirthDate,
LastLogin: u.LastLogin,
}
}
@@ -34,6 +44,9 @@ func CastUserToDomain(u User) *domain.User {
LastName: u.LastName,
PhoneNumber: u.Phone,
NationalID: u.NationalID,
Email: u.Email,
BirthDate: u.BirthDate,
LastLogin: u.LastLogin,
CreatedAt: u.CreatedAt,
UpdatedAt: u.UpdatedAt,
DeletedAt: u.DeletedAt,