association_table = Table("association_table",
Base.metadata,
Column("show_id", Integer(), ForeignKey("show_times.id"), primary_key=True),
Column("theater_id", Integer(), ForeignKey("theaters.id")))
association_table2 = Table("association_table2",
Base.metadata,
Column("show_id", Integer(), ForeignKey("show_times.id"), primary_key=True),
Column("movie_id", Integer(), ForeignKey("movies.id")))
class Movie(Base):
__tablename__ = "movies"
id = Column(Integer, primary_key=True)
title = Column(String(), unique=True)
plot = Column(String())
duration = Column(String())
rating = Column(String())
trailer = Column(String())
imdb = Column(String())
poster = Column(String())
summary = Column(String())
class Theater(Base):
__tablename__ = "theaters"
id = Column(Integer, primary_key=True)
zip_code = Column(String())
city = Column(String())
state = Column(String())
address = Column(String())
phone_number = Column(String()) …
Run Code Online (Sandbox Code Playgroud)