Files
cht-lawfirm/back/app/user/schemas.py
2025-03-17 16:58:15 +01:00

31 lines
521 B
Python

from typing import Annotated
from pydantic import BaseModel, Field
from fastapi_users import schemas
from .models import User
class UserBase(schemas.CreateUpdateDictModel):
pass
class UserRead(User):
_id: Annotated[str, Field(alias='id')]
hashed_password: Annotated[str, Field(exclude=True)]
class UserCreate(UserBase):
login: str
password: str
email: str
entity_id: str
class UserUpdate(UserBase):
pass
class PasswordUpdate(BaseModel):
old_password: str
password: str