diff options
| author | Karan Jayachandra <mail@karanjayachandra.com> | 2024-12-02 19:33:48 +0100 |
|---|---|---|
| committer | Karan Jayachandra <mail@karanjayachandra.com> | 2024-12-02 19:33:48 +0100 |
| commit | beea33bc183837a3feceaf1b5127c2e21e16fc36 (patch) | |
| tree | ed0d9b5f4e3ad600f8d498227323576800983608 /src/match_up/data.py | |
| parent | 6ebbee2016b0232573ad1d322b4d4ca6287b3599 (diff) | |
Added team based games
Diffstat (limited to 'src/match_up/data.py')
| -rw-r--r-- | src/match_up/data.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/match_up/data.py b/src/match_up/data.py index 636a5eb..d8996fe 100644 --- a/src/match_up/data.py +++ b/src/match_up/data.py @@ -18,15 +18,18 @@ 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) + def __init__( self, id: int, first: str = "", last: str = "", level: int = 0, + team: int = 0, status: bool = True, count: int = 0, ): @@ -34,12 +37,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: |
