Example #1
0
class ViewModel(ViewMixin, db.Model):
    __tablename__ = 'views'

    user_id = db.Column(db.Integer(), db.ForeignKey('users.id'))
    post_id = db.Column(db.Integer(), db.ForeignKey('posts.id'))

    test_model = TestViewModel
Example #2
0
class TheaterTicketModel(TheaterTicketMixin, db.Model):
    __tablename__ = 'theater_tickets'

    test_model = TestTheaterTicketModel

    showtime_id = db.Column(db.Integer(), db.ForeignKey('showtimes.id'))
    theater_id = db.Column(db.Integer(), db.ForeignKey('theaters.id'))
Example #3
0
class TestShowtimeModel(ShowtimeMixin, db.Model):
    __tablename__ = 'test_showtimes'

    cinema_id = db.Column(db.Integer, db.ForeignKey('test_cinemas.id'))
    movie_id = db.Column(db.Integer, db.ForeignKey('test_movies.id'))
    theater_id = db.Column(db.Integer, db.ForeignKey('test_theaters.id'))

    theater = db.relationship('TestTheaterModel', backref='showtimes')
Example #4
0
class TestShowtimeModel(ShowtimeMixin, db.Model):
    __tablename__ = 'test_showtimes'
    __table_args__ = {'extend_existing': True}

    movie_id = db.Column(db.Integer, db.ForeignKey('test_movies.id'))
    theater_id = db.Column(db.Integer, db.ForeignKey('test_theaters.id'))

    theater = db.relationship('TestTheaterModel')
Example #5
0
class CommentModel(CommentMixin, db.Model):
    __tablename__ = 'comments'

    user_id = db.Column(db.Integer(), db.ForeignKey('users.id'))
    post_id = db.Column(db.Integer(), db.ForeignKey('posts.id'))
    parent_id = db.Column(db.Integer(), nullable=True)

    test_model = TestCommentModel
Example #6
0
class TestTheaterModel(TheaterMixin, db.Model):
    __tablename__ = 'test_theaters'

    cinema_id = db.Column(db.Integer(), db.ForeignKey('test_cinemas.id'))

    theater_tickets = db.relationship('TestTheaterTicketModel',
                                      backref='theater')
Example #7
0
class TheaterTicketModel(TheaterTicketMixin, db.Model):
    __tablename__ = 'theater_tickets'
    __table_args__ = {'extend_existing': True}

    test_model = TestTheaterTicketModel

    theater_id = db.Column(db.Integer(), db.ForeignKey('theaters.id'))
Example #8
0
class PostModel(PostMixin, db.Model):
    __tablename__ = 'posts'

    user_id = db.Column(db.Integer(), db.ForeignKey('users.id'))

    tags = db.relationship('TagModel', backref='post')

    test_model = TestPostModel
Example #9
0
class TagModel(TagMixin, db.Model):
    __tablename__ = 'tags'

    post_id = db.Column(db.Integer(), db.ForeignKey('posts.id'))

    test_model = TestTagModel