|
|
@ -5,7 +5,6 @@ from app import db |
|
|
|
from .role import Role |
|
|
|
from .role import Role |
|
|
|
from .notification_player import NotificationPlayer |
|
|
|
from .notification_player import NotificationPlayer |
|
|
|
from .player_found_objective import PlayerFoundObjective |
|
|
|
from .player_found_objective import PlayerFoundObjective |
|
|
|
from .player_caught_player import PlayerCaughtPlayer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GamePlayer(db.Model): |
|
|
|
class GamePlayer(db.Model): |
|
|
|
__tablename__ = 'game_player' |
|
|
|
__tablename__ = 'game_player' |
|
|
@ -32,18 +31,5 @@ class GamePlayer(db.Model): |
|
|
|
found_objectives = association_proxy('player_found_objectives', 'objective', |
|
|
|
found_objectives = association_proxy('player_found_objectives', 'objective', |
|
|
|
creator=lambda objective: PlayerFoundObjective(objective=objective)) |
|
|
|
creator=lambda objective: PlayerFoundObjective(objective=objective)) |
|
|
|
|
|
|
|
|
|
|
|
player_caught_players = db.relationship( |
|
|
|
caught_by_players = association_proxy('player_caught_by_players', 'caught_player') |
|
|
|
'PlayerCaughtPlayer', |
|
|
|
caught_players = association_proxy('player_caught_players', 'catching_player') |
|
|
|
back_populates='catching_player', |
|
|
|
|
|
|
|
cascade='save-update, merge, delete, delete-orphan', |
|
|
|
|
|
|
|
foreign_keys=[PlayerCaughtPlayer.catching_player_id]) |
|
|
|
|
|
|
|
caught_players = association_proxy('player_caught_players', 'game_player', |
|
|
|
|
|
|
|
creator=lambda game_player: PlayerCaughtPlayer(caught_player=game_player)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
player_caught_by_players = db.relationship( |
|
|
|
|
|
|
|
'PlayerCaughtPlayer', |
|
|
|
|
|
|
|
back_populates='caught_player', |
|
|
|
|
|
|
|
cascade='save-update, merge, delete, delete-orphan',# zorgt dit voor cirkel? |
|
|
|
|
|
|
|
foreign_keys=[PlayerCaughtPlayer.caught_player_id]) |
|
|
|
|
|
|
|
caught_by_players = association_proxy('player_caught_by_players', 'game_player', |
|
|
|
|
|
|
|
creator=lambda game_player: PlayerCaughtPlayer(catching_player=game_player)) |
|
|
|
|
|
|
|