22 lines
544 B
Python
22 lines
544 B
Python
from abc import ABC
|
|
from enum import Enum
|
|
|
|
from pydantic.dataclasses import dataclass
|
|
from typing import Callable
|
|
|
|
|
|
class TicketType(str, Enum):
|
|
WIN_DRAW_LOSE = "win_draw_lose"
|
|
# postup?
|
|
WIN_DRAW_LOSE_DOUBLE = "win_draw_lose_double"
|
|
WIN_LOSE = "win_lose"
|
|
BOTH_TEAM_SCORED = "both_team_scored"
|
|
GOAL_AMOUNT = "goal_amount"
|
|
...
|
|
|
|
# Classes that inherit from this are defined in resolution file, so the deciding function can be used
|
|
@dataclass
|
|
class Ticket(ABC):
|
|
ticketType: TicketType
|
|
decidingFunction: Callable
|