Initial commit: SIBU 2.0 MISSION

This commit is contained in:
2026-02-21 09:53:31 -05:00
commit 0c7aa53c8b
400 changed files with 67708 additions and 0 deletions

View File

@ -0,0 +1,35 @@
"""Bus stop model."""
from sqlmodel import SQLModel, Field, Column
from datetime import datetime
from typing import Optional
from enum import Enum
from uuid import UUID, uuid4
from sqlalchemy import DateTime, func
class StopType(str, Enum):
"""Stop type enumeration."""
TERMINAL = "terminal"
REGULAR = "regular"
EXPRESS_ONLY = "express_only"
class BusStop(SQLModel, table=True):
"""Bus stop model."""
__tablename__ = "bus_stops"
id: Optional[UUID] = Field(default_factory=uuid4, primary_key=True)
name: str
latitude: float
longitude: float
city: str
address: Optional[str] = None
stop_type: StopType = StopType.REGULAR
has_shelter: bool = False
has_seating: bool = False
is_accessible: bool = False
stop_order: Optional[int] = None
created_at: Optional[datetime] = Field(sa_column=Column(DateTime, server_default=func.now()))
updated_at: Optional[datetime] = Field(sa_column=Column(DateTime, server_default=func.now(), onupdate=func.now()))