Add one more classified class

This commit is contained in:
2026-03-21 21:12:03 +01:00
parent 57ad6c71f8
commit f40a7911ca

View File

@@ -13,6 +13,7 @@ class TicketType(str, Enum):
WIN_LOSE = "win_lose" WIN_LOSE = "win_lose"
BOTH_TEAM_SCORED = "both_team_scored" BOTH_TEAM_SCORED = "both_team_scored"
GOAL_AMOUNT = "goal_amount" GOAL_AMOUNT = "goal_amount"
GOAL_HANDICAP = "goal_handicap"
... ...
@dataclass @dataclass
@@ -58,8 +59,17 @@ class BothTeamScored(Ticket):
... ...
class GoalAmount(Ticket): class GoalAmount(Ticket):
"""Počet gólů v zápasu — over/under total goals"""
ticketType: TicketType.GOAL_AMOUNT ticketType: TicketType.GOAL_AMOUNT
team_bet: Literal["1", "2"] # if we are betting for team 1 or team 2 line: float # goal line, e.g. 2.5
handicap_amount: float # -0.5, +1.5 .... over: bool # True = more than line, False = less than line
def resolve(self):
...
class GoalHandicap(Ticket):
"""Goal handicap for a specific team — add handicap_amount to team's score, team wins = you win"""
ticketType: TicketType.GOAL_HANDICAP
team_bet: Literal["1", "2"] # which team the handicap is applied to
handicap_amount: float # e.g. +1.5 or -0.5
def resolve(self): def resolve(self):
... ...