mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Создание чата9
This commit is contained in:
@@ -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
|
Reference in New Issue
Block a user