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.

пре 1 година
1234567891011121314151617181920
  1. from pydantic import BaseModel, Field
  2. class CreateTask(BaseModel):
  3. DriverId: int = Field()
  4. Description: str = Field(..., min_length=3, max_length=200)
  5. StartLocation: tuple[str, str] = Field(...)
  6. EndLocation: tuple[str, str] = Field(...)
  7. class ShowTask(BaseModel):
  8. Id: int
  9. DriverId: int
  10. Description: str
  11. Status: str
  12. StartLocation: tuple[str, str]
  13. EndLocation: tuple[str, str]
  14. class Config:
  15. orm_mode = True