summaryrefslogtreecommitdiff
path: root/src/match_up/data.py
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2024-12-02 19:50:15 +0000
committerKaran Jayachandra <mail@karanjayachandra.com>2024-12-02 19:50:15 +0000
commitfd03b6dd91be67b96356827a2ce4b7728d2e25ea (patch)
tree8d9cf47a6bbac47fe9eeffbc0d92a1eef4323572 /src/match_up/data.py
parent7b7f8cdef5f035ccdab714059c1a6c54b80c4ba3 (diff)
parent662e0854a6c61503954aa659e1c932db69443a06 (diff)
Merge branch 'develop' into 'main'
Develop See merge request KaranJayachandra/match_up!12
Diffstat (limited to 'src/match_up/data.py')
-rw-r--r--src/match_up/data.py8
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: