1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Создание чата9

This commit is contained in:
MoonTestUse1
2025-01-05 06:07:53 +06:00
parent 0cb78fc749
commit a606ec4a68
3 changed files with 35 additions and 29 deletions

View File

@@ -1,16 +1,19 @@
from pydantic import BaseModel, EmailStr
"""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
is_admin: bool
is_active: bool = True
class Config:
from_attributes = True