🎨 Reorganize back-end code

This commit is contained in:
2023-09-20 22:08:32 +02:00
parent bdbc72ab39
commit 3434802b31
28 changed files with 29 additions and 36 deletions

View File

@@ -0,0 +1,31 @@
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]