from pydantic import BaseModel, Field from datetime import datetime from typing import List, Optional from schemas.carpart import ShowCarPart from schemas.user import ShowUser class CreateMaintenanceJob(BaseModel): Description: str = Field(...) Date: datetime = Field(...) class OutputMaintenanceJob(BaseModel): Id: int Description: str Date: datetime CarPartsList: Optional[List[ShowCarPart]] TotalCost: int AssignedTo: ShowUser