1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00
Files
AdministrationItDepartmens/backend/app/schemas/employee.py
2025-01-03 16:45:25 +06:00

21 lines
453 B
Python

"""Employee schemas"""
from pydantic import BaseModel, ConfigDict
from typing import Optional
class EmployeeBase(BaseModel):
first_name: str
last_name: str
department: str
office: str
class EmployeeCreate(EmployeeBase):
password: str
class EmployeeUpdate(EmployeeBase):
password: Optional[str] = None
class Employee(EmployeeBase):
model_config = ConfigDict(from_attributes=True)
id: int
hashed_password: str