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

Тесты для бекенда

This commit is contained in:
MoonTestUse1
2025-01-04 03:22:23 +06:00
parent 0d543ed4f6
commit 2bde43c076
28 changed files with 740 additions and 990 deletions

View File

@@ -1,6 +1,5 @@
"""Employee schemas"""
from pydantic import BaseModel, ConfigDict
from typing import Optional
class EmployeeBase(BaseModel):
first_name: str
@@ -8,14 +7,15 @@ class EmployeeBase(BaseModel):
department: str
office: str
model_config = ConfigDict(from_attributes=True)
class EmployeeCreate(EmployeeBase):
password: str
class EmployeeUpdate(EmployeeBase):
password: Optional[str] = None
pass
class Employee(EmployeeBase):
model_config = ConfigDict(from_attributes=True)
id: int
hashed_password: str
model_config = ConfigDict(from_attributes=True)