選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

vehicle.py 781 B

123456789101112131415161718192021222324252627282930313233343536
  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