From f40a7911ca7625f45d1a93fec2358f8b26fdad16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janek=20Hlavat=C3=BD?= Date: Sat, 21 Mar 2026 21:12:03 +0100 Subject: [PATCH] Add one more classified class --- src/beaky/datamodels/ticket.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/beaky/datamodels/ticket.py b/src/beaky/datamodels/ticket.py index a1c85af..2c2959a 100644 --- a/src/beaky/datamodels/ticket.py +++ b/src/beaky/datamodels/ticket.py @@ -13,6 +13,7 @@ class TicketType(str, Enum): WIN_LOSE = "win_lose" BOTH_TEAM_SCORED = "both_team_scored" GOAL_AMOUNT = "goal_amount" + GOAL_HANDICAP = "goal_handicap" ... @dataclass @@ -58,8 +59,17 @@ class BothTeamScored(Ticket): ... class GoalAmount(Ticket): + """Počet gólů v zápasu — over/under total goals""" ticketType: TicketType.GOAL_AMOUNT - team_bet: Literal["1", "2"] # if we are betting for team 1 or team 2 - handicap_amount: float # -0.5, +1.5 .... + line: float # goal line, e.g. 2.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): ...