from app import db class NotificationPlayer(db.Model): __tablename__ = 'notification_player' notification_id = db.Column(db.Integer, db.ForeignKey('notification.id'), primary_key=True, nullable=False) player_id = db.Column(db.Integer, db.ForeignKey('player.id'), primary_key=True, nullable=False) been_shown = db.Column(db.Boolean, server_default='True', nullable=False) notification = db.relationship('Notification', back_populates='notification_recipients') recipient = db.relationship('Player', back_populates='player_notifications')