Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

maintenancejob.py 794 B

1 år sedan
1 år sedan
123456789101112131415161718192021222324252627282930313233
  1. from pydantic import BaseModel, Field
  2. from datetime import datetime
  3. from typing import List, Optional
  4. from schemas.carpart import ShowCarPart
  5. from schemas.user import ShowUser
  6. from schemas.vehicle import OutputVehicle
  7. class CreateMaintenanceJob(BaseModel):
  8. Description: str = Field(...)
  9. VehicleID: int = Field(...)
  10. Date: datetime = Field(...)
  11. class OutputMaintenanceJob(BaseModel):
  12. Id: int
  13. Description: str
  14. Date: datetime
  15. CarPartsList: Optional[List[ShowCarPart]]
  16. TotalCost: float
  17. Vehicle: OutputVehicle
  18. FinishedBy: Optional[ShowUser]
  19. Status: str
  20. class OutputMinimalMaintenanceJob(BaseModel):
  21. Id: int
  22. Description: str
  23. Date: datetime
  24. TotalCost: float
  25. Vehicle: OutputVehicle
  26. FinishedBy: Optional[ShowUser]
  27. Status: str