summaryrefslogtreecommitdiff
path: root/src/match_up/data.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/match_up/data.py')
-rw-r--r--src/match_up/data.py7
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: