From a0f6920c9bb09316d5de47b4dcd5057c82715352 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Sun, 15 Jun 2014 21:16:30 -0400 Subject: [PATCH] Add support for the new player_groups table. --- xonstat/models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xonstat/models.py b/xonstat/models.py index 6cf94b8..b496104 100644 --- a/xonstat/models.py +++ b/xonstat/models.py @@ -322,6 +322,15 @@ class PlayerGameAnticheat(object): return "" % (self.key, self.value) +class PlayerGroups(object): + def __init__(self, player_id=None, group_name=None): + self.player_id = player_id + self.group_name = group_name + + def __repr__(self): + return "" % (self.player_id, self.group_name) + + def initialize_db(engine=None): DBSession.configure(bind=engine) Base.metadata.bind = engine @@ -349,6 +358,7 @@ def initialize_db(engine=None): summary_stats_table = MetaData.tables['summary_stats'] team_game_stats_table = MetaData.tables['team_game_stats'] player_game_anticheats_table = MetaData.tables['player_game_anticheats'] + player_groups_table = MetaData.tables['player_groups'] # now map the tables and the objects together mapper(PlayerAchievement, achievements_table) @@ -369,3 +379,4 @@ def initialize_db(engine=None): mapper(SummaryStat, summary_stats_table) mapper(TeamGameStat, team_game_stats_table) mapper(PlayerGameAnticheat, player_game_anticheats_table) + mapper(PlayerGroups, player_groups_table) -- 2.39.2