Files
X-Financial/server/src/app/schemas/employee.py

25 lines
453 B
Python
Raw Normal View History

from __future__ import annotations
from datetime import datetime
from pydantic import BaseModel, ConfigDict, EmailStr
class EmployeeCreate(BaseModel):
employee_no: str
name: str
department: str
email: EmailStr
class EmployeeRead(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: str
employee_no: str
name: str
department: str
email: EmailStr
created_at: datetime
updated_at: datetime