You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vehicle.py 795 B

12345678910111213141516171819202122232425262728293031323334353637
  1. from typing import Optional
  2. from pydantic import BaseModel
  3. class CreateVehicle(BaseModel):
  4. Model: str
  5. Year: int
  6. LicensePlate: str
  7. Mileage: int
  8. Capacity: int
  9. class OutputVehicle(BaseModel):
  10. Id: int
  11. Model: str
  12. Year: int
  13. LicensePlate: str
  14. Mileage: int
  15. CurrentLocation: Optional[list[str]] = None
  16. Fuel: Optional[int] = 0
  17. MaintenanceNotes: Optional[list[str]] = None
  18. AssignedDriver: Optional[int] = None
  19. Capacity: int
  20. Status: str
  21. class UpdateVehicle(BaseModel):
  22. Model: str
  23. Year: int
  24. LicensePlate: str
  25. Capacity: int
  26. Mileage: int
  27. Status: str
  28. CurrentLocation: Optional[list[str]] = None
  29. Fuel: Optional[int] = 0
  30. MaintenanceNotes: Optional[list[str]] = None
  31. AssignedDriver: Optional[int] = None