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

fuelingtask.py 889 B

123456789101112131415161718192021222324252627282930
  1. from pydantic import BaseModel, Field
  2. from datetime import datetime
  3. from schemas.user import ShowDriver
  4. class CreateFuelingTask(BaseModel):
  5. VehicleId: int = Field(...)
  6. Description: str = Field(...)
  7. Date: datetime = Field(...)
  8. Cost: int = Field(...)
  9. FuelRefilled: int = Field(...)
  10. GasStationName: str = Field(...)
  11. ImageBefore: bytearray = Field(...)
  12. ImageAfter: bytearray = Field(...)
  13. model_config={
  14. "arbitrary_types_allowed": True
  15. }
  16. class OutputFuelingTask(BaseModel):
  17. VehicleId: int = Field(...)
  18. Description: str = Field(...)
  19. Date: datetime = Field(...)
  20. Cost: int = Field(...)
  21. FuelRefilled: int = Field(...)
  22. GasStationName: str = Field(...)
  23. ImageBefore: bytearray = Field(...)
  24. ImageAfter: bytearray = Field(...)
  25. Driver: ShowDriver | None
  26. model_config={
  27. "arbitrary_types_allowed": True
  28. }