You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

10 lines
580 B

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)
game_player_id = db.Column(db.Integer, db.ForeignKey('game_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('GamePlayer', back_populates='player_notifications')