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.
 
 
 
 
 

11 lines
629 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')
player_id = db.Column(db.Integer, db.ForeignKey('player.id'), primary_key=True, nullable=False, server_default='-1')
timestamp = db.Column(db.DateTime, server_default=func.now(), nullable=False)
player = db.relationship('Player', back_populates='player_found_objectives')
objective = db.relationship('Objective', back_populates='objective_found_by')