Skip to content

Commit

Permalink
Merge pull request #543 from LACMTA/2023-api-optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
albertkun authored May 31, 2024
2 parents 2ba843b + 339bd16 commit 9d88dc5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fastapi/app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def handle_type(self, column):
return data.to_dict()
return data

class Agency(Base):
class Agency(BaseModel):
__tablename__ = "agency"
agency_id = Column(String, primary_key=True, index=True)
agency_name = Column(String)
Expand All @@ -36,7 +36,7 @@ class Agency(Base):
agency_lang = Column(String)
agency_phone = Column(String)

class Calendar(Base):
class Calendar(BaseModel):
__tablename__ = "calendar"
service_id = Column(String, primary_key=True, index=True)
monday = Column(Integer)
Expand All @@ -50,7 +50,7 @@ class Calendar(Base):
end_date = Column(Integer)
agency_id = Column(String)

class CalendarDates(Base):
class CalendarDates(BaseModel):
__tablename__ = "calendar_dates"
service_id = Column(String, primary_key=True, index=True)
agency_id = Column(String)
Expand Down Expand Up @@ -80,7 +80,7 @@ class StopTimes(BaseModel):
trip_id = Column(String, primary_key=True,index=True)
rider_usage_code = Column(Integer)

class Stops(Base):
class Stops(BaseModel):
__tablename__ = "stops"
stop_id = Column(Integer, primary_key=True, index=True)
stop_code = Column(Integer)
Expand All @@ -96,7 +96,7 @@ class Stops(Base):
agency_id = Column(String)


class Routes(Base):
class Routes(BaseModel):
__tablename__ = "routes"
route_id = Column(String, primary_key=True, index=True)
route_short_name = Column(String)
Expand Down

0 comments on commit 9d88dc5

Please sign in to comment.