mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
19 lines
413 B
Python
19 lines
413 B
Python
"""User schemas"""
|
|
from pydantic import BaseModel, EmailStr, ConfigDict
|
|
from typing import Optional
|
|
|
|
class UserBase(BaseModel):
|
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
email: EmailStr
|
|
full_name: str
|
|
is_admin: bool = False
|
|
|
|
class UserCreate(UserBase):
|
|
password: str
|
|
|
|
class User(UserBase):
|
|
id: int
|
|
is_active: bool = True
|
|
|
|
class Config:
|
|
from_attributes = True |