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