您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

36 行
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]