Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 

40 wiersze
860 B

  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
  32. class VehicleLocation(BaseModel):
  33. CurrentLocation: list[str]