Files
encoach_backend/ielts_be/dtos/user_batch.py

36 lines
741 B
Python

import uuid
from typing import Optional
from pydantic import BaseModel, Field
class DemographicInfo(BaseModel):
phone: str
passport_id: Optional[str] = None
country: Optional[str] = None
class Entity(BaseModel):
id: str
role: str
class UserDTO(BaseModel):
id: uuid.UUID = Field(default_factory=uuid.uuid4)
email: str
name: str
type: str
passport_id: str
passwordHash: str
passwordSalt: str
groupName: Optional[str] = None
corporate: Optional[str] = None
studentID: Optional[str] = None
expiryDate: Optional[str] = None
demographicInformation: Optional[DemographicInfo] = None
entities: list[dict] = Field(default_factory=list)
class BatchUsersDTO(BaseModel):
makerID: str
users: list[UserDTO]