feat: Update Route schemas with new fields

This commit is contained in:
Backend IM Bot 2025-04-09 13:24:35 +00:00
parent be64e5bf88
commit 82a7bdfe38

View File

@ -5,6 +5,9 @@ from uuid import UUID
# Schema for creating a new Route
class RouteCreate(BaseModel):
waypoints: Optional[List[Any]]
optimized_distance: Optional[int]
optimized_duration: Optional[int]
name: str = Field(..., description="Name of the route")
description: Optional[str] = Field(None, description="Description of the route")
origin: str = Field(..., description="Origin location of the route")
@ -25,4 +28,9 @@ class RouteSchema(BaseModel):
updated_at: datetime
class Config:
orm_mode = True
orm_mode = True
waypoints: Optional[List[Any]]
optimized_distance: Optional[int]
optimized_duration: Optional[int]