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 720 B

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