leaguemanager.models.baseline.competition.ruleset¶
Module Contents¶
Classes¶
Defines the ruleset specific to a Competition, such as a Season. |
Functions¶
Data¶
API¶
- leaguemanager.models.baseline.competition.ruleset.sched_type_converter(value)¶
- class leaguemanager.models.baseline.competition.ruleset.Ruleset¶
Bases:
leaguemanager.models.base.PropertiesBaseDefines the ruleset specific to a Competition, such as a Season.
As opposed to a competition’s Properties, the Ruleset provides the specifics and format of each Event/Fixture. It defines the parameters of a specific Season that is useful for generating a schedule (i.e., start date, number of games per season, length of games).
Note: Only “round robin” schedule_type is implemented so far.
TODO: Implement “bracket” and “tournament” schedule_type schedulers
Attributes: id (UUID): Inherited from UUIDAuditBase season_id (UUID): ForeignKey to League. site_id (UUID): ForeignKey to Site. schedule_type (str): Affects how games are scheduled and standings displayed (i.e, “round robin”, “tournament”) start_date (datetime): The date (and time) of first game. game_length (int): Total time of a Fixture (in minutes, including breaks). time_between (int): Time between end of last Fixture and start of next. number_of_teams (int): Active teams this Season. number_of_phases (int): Number of total phases per team (one game per team per phase). tiebreaker (str): Tie breaker rules. venue_count (int): In the case of multiple venues/play locations (i.e., Field 4, Court B, etc…) mon_fixtures (bool): Whether Fixtures can be scheduled on Monday. tue_fixtures (bool): Whether Fixtures can be scheduled on Tuesday. wed_fixtures (bool): Whether Fixtures can be scheduled on Wednesday. thu_fixtures (bool): Whether Fixtures can be scheduled on Thursday. fri_fixtures (bool): Whether Fixtures can be scheduled on Friday. sat_fixtures (bool): Whether Fixtures can be scheduled on Saturday. sun_fixtures (bool): Whether Fixtures can be scheduled on Sunday. created_at (datetime): Inherited from UUIDAuditBase updated_at (datetime): Inherited from UUIDAuditBase
- season_id: uuid.UUID | None¶
‘field(…)’
- site_id: uuid.UUID | None¶
‘field(…)’
- schedule_type: str | None¶
‘field(…)’
- start_date: datetime.datetime | None¶
‘field(…)’
- game_length: int | None¶
‘field(…)’
- time_between: int | None¶
‘field(…)’
- number_of_teams: int | None¶
‘field(…)’
- number_of_phases: int | None¶
‘field(…)’
- tiebreaker: str | None¶
‘field(…)’
- venue_count: int | None¶
‘field(…)’
- mon_fixtures: bool¶
‘field(…)’
- tue_fixtures: bool¶
‘field(…)’
- wed_fixtures: bool¶
‘field(…)’
- thu_fixtures: bool¶
‘field(…)’
- fri_fixtures: bool¶
‘field(…)’
- sat_fixtures: bool¶
‘field(…)’
- sun_fixtures: bool¶
‘field(…)’
- leaguemanager.models.baseline.competition.ruleset.ruleset¶
‘Table(…)’