Browse Source

Add id to Game_Player

testing
Burathar 5 years ago
parent
commit
6ae6cb2755
  1. 1
      app/models/game_player.py

1
app/models/game_player.py

@ -3,6 +3,7 @@ from app.models import Role
class GamePlayer(db.Model): class GamePlayer(db.Model):
__tablename__ = 'game_player' __tablename__ = 'game_player'
id = db.Column(db.Integer, primary_key=True)
game_id = db.Column(db.Integer, db.ForeignKey('game.id'), primary_key=True, nullable=False) game_id = db.Column(db.Integer, db.ForeignKey('game.id'), primary_key=True, nullable=False)
user_id = db.Column(db.Integer, db.ForeignKey('user.id'), primary_key=True, nullable=False) user_id = db.Column(db.Integer, db.ForeignKey('user.id'), primary_key=True, nullable=False)
role = db.Column(db.Enum(Role), server_default=Role(0).name, nullable=False) role = db.Column(db.Enum(Role), server_default=Role(0).name, nullable=False)

Loading…
Cancel
Save