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

37 行
781 B

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