Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 11 mēnešiem
1234567891011121314151617181920212223242526
  1. from pydantic import BaseModel, Field
  2. from datetime import datetime
  3. from schemas.user import ShowDriver
  4. from typing import Optional
  5. class CreateTask(BaseModel):
  6. DriverId: int = Field(...)
  7. Description: str = Field(..., min_length=3, max_length=200)
  8. StartLocation: tuple[str, str] = Field(...)
  9. EndLocation: tuple[str, str] = Field(...)
  10. class ShowTask(BaseModel):
  11. Id: int
  12. Driver: Optional[ShowDriver]
  13. Description: str
  14. Status: str
  15. StartLocation: tuple[str, str]
  16. EndLocation: tuple[str, str]
  17. StartDateTime: Optional[datetime]
  18. DistanceCovered: Optional[float]
  19. EndDateTime: Optional[datetime]
  20. class Config:
  21. orm_mode = True