You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
889 B

  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. }