Files
carrramba-encore-rate/backend/api/schemas/stop.py
2023-09-20 22:08:32 +02:00

32 lines
541 B
Python

from pydantic import BaseModel
from idfm_interface import StopAreaType
class Stop(BaseModel):
id: int
name: str
town: str
epsg3857_x: float
epsg3857_y: float
lines: list[int]
class StopArea(BaseModel):
id: int
name: str
town: str
type: StopAreaType
lines: list[int] # SNCF lines are linked to stop areas and not stops.
stops: list[Stop]
Point = tuple[float, float]
class StopShape(BaseModel):
id: int
type: int
epsg3857_bbox: list[Point]
epsg3857_points: list[Point]