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.
 
 

26 lines
536 B

  1. from typing import Optional
  2. from pydantic import BaseModel, root_validator
  3. from datetime import datetime
  4. class CreateVehicle(BaseModel):
  5. Id: int
  6. Model: str
  7. Year: int
  8. LicensePlate: str
  9. Type: str
  10. Mileage: int
  11. class OutputVehicle(BaseModel):
  12. Id: int
  13. Model: str
  14. Year: int
  15. LicensePlate: str
  16. Type: str
  17. Mileage: int
  18. CurrentLocation: Optional[list[str]] = None
  19. Fuel: Optional[int] = 0
  20. MaintenanceNotes: Optional[list[str]] = None
  21. AssignedDriverIds: Optional[list[int]] = None