@@ -55,6 +55,12 @@ class Stop(db.Model):
|
||||
municipality = db.Column(db.String(120))
|
||||
latitude = db.Column(db.Float, nullable=False)
|
||||
longitude = db.Column(db.Float, nullable=False)
|
||||
# ";"-joined line refs serving this stop (e.g. "693" or "S2;U4;WLB"), from
|
||||
# OSM route relations; empty when unknown. Used by the "Linie" autocomplete.
|
||||
lines = db.Column(db.String(255), nullable=False, default="")
|
||||
|
||||
def line_list(self) -> list[str]:
|
||||
return [ref for ref in self.lines.split(";") if ref]
|
||||
|
||||
__table_args__ = (
|
||||
db.UniqueConstraint("osm_type", "osm_id", name="uq_stops_osm"),
|
||||
|
||||
Reference in New Issue
Block a user