25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

43 lines
894 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(BaseModel):
  25. Mileage: Optional[int]
  26. Status: Optional[str]
  27. Capacity: Optional[int]
  28. Model: Optional[str]
  29. Year: Optional[int]
  30. LicensePlate: Optional[str]
  31. Fuel: Optional[int] = 0
  32. Type: Optional[str]
  33. class VehicleLocation(BaseModel):
  34. CurrentLocation: list[str]