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.

12 lines
648 B

from sqlalchemy.sql import func
from app import db
class PlayerFoundObjective(db.Model):
__tablename__ = 'player_found_objective'
objective_id = db.Column(db.Integer, db.ForeignKey('objective.id'), primary_key=True, nullable=False, server_default='-1')
game_player_id = db.Column(db.Integer, db.ForeignKey('game_player.id'), primary_key=True, nullable=False, server_default='-1')
timestamp = db.Column(db.DateTime, server_default=func.now(), nullable=False)
game_player = db.relationship('GamePlayer', back_populates='player_found_objectives')
objective = db.relationship('Objective', back_populates='objective_found_by')