|
1234567891011121314151617181920 |
- from pydantic import BaseModel, Field
-
-
- class CreateTask(BaseModel):
- DriverId: int = Field()
- Description: str = Field(..., min_length=3, max_length=200)
- StartLocation: tuple[str, str] = Field(...)
- EndLocation: tuple[str, str] = Field(...)
-
-
- class ShowTask(BaseModel):
- Id: int
- DriverId: int
- Description: str
- Status: str
- StartLocation: tuple[str, str]
- EndLocation: tuple[str, str]
-
- class Config:
- orm_mode = True
|