mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
20 lines
400 B
Python
20 lines
400 B
Python
"""Employee schemas"""
|
|
from pydantic import BaseModel
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
class EmployeeBase(BaseModel):
|
|
first_name: str
|
|
last_name: str
|
|
department: str
|
|
office: str
|
|
|
|
class EmployeeCreate(EmployeeBase):
|
|
password: str
|
|
|
|
class EmployeeResponse(EmployeeBase):
|
|
id: int
|
|
created_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True |