diff options
Diffstat (limited to 'src/match_up/data.py')
| -rw-r--r-- | src/match_up/data.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/match_up/data.py b/src/match_up/data.py index 62aa5d8..c00dde2 100644 --- a/src/match_up/data.py +++ b/src/match_up/data.py @@ -6,6 +6,8 @@ from sqlalchemy.ext.declarative import declarative_base MIN_LEVEL = 1 MAX_LEVEL = 10 PLAYER_PER_COURT = 4 +GUEST_LEVELS = [1, 3, 5] +GUESTS_PER_LEVEL = 4 BASE = declarative_base() @@ -16,6 +18,7 @@ class Player(BASE): first = Column("first", String) last = Column("last", String) level = Column("level", Integer) + team = Column("team", Integer) status = Column("status", Integer) count = Column("count", Integer) @@ -25,6 +28,7 @@ class Player(BASE): first: str = "", last: str = "", level: int = 0, + team: int = 0, status: bool = True, count: int = 0, ): @@ -32,12 +36,14 @@ class Player(BASE): self.first = first self.last = last self.status = status + self.team = team self.level = level self.count = count def __repr__(self): + team = f" of Team {self.team}" if self.team else "" status = "active" if self.status else "inactive" - return f"{self.first} {self.last} (Level {self.level}) is {status} and has played {self.count} games" + return f"{self.first} {self.last} (Level {self.level}){team} is {status} and has played {self.count} games" class DisplayPlayer: |
