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.
 
 

36 line
693 B

  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(OutputVehicle):
  25. pass
  26. class VehicleLocation(BaseModel):
  27. CurrentLocation: list[str]