mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Добавления тестов бекенда
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
"""Employee schemas"""
|
||||
from pydantic import BaseModel
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
class EmployeeBase(BaseModel):
|
||||
first_name: str
|
||||
last_name: str
|
||||
department: str
|
||||
office: str
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
class EmployeeCreate(EmployeeBase):
|
||||
password: str
|
||||
|
||||
class EmployeeResponse(EmployeeBase):
|
||||
id: int
|
||||
created_at: datetime
|
||||
class EmployeeUpdate(BaseModel):
|
||||
first_name: str | None = None
|
||||
last_name: str | None = None
|
||||
department: str | None = None
|
||||
office: str | None = None
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
class EmployeeResponse(EmployeeBase):
|
||||
id: int
|
||||
Reference in New Issue
Block a user