leaguemanager.services.competition.season

Module Contents

Classes

SeasonService

Handles database operations for season data.

SeasonAsyncService

Handles database operations for season data.

Data

__all__

API

leaguemanager.services.competition.season.__all__

[‘SeasonService’, ‘SeasonAsyncService’]

class leaguemanager.services.competition.season.SeasonService

Bases: leaguemanager.services.base.SQLAlchemySyncRepositoryService

Handles database operations for season data.

class SlugRepo

Bases: advanced_alchemy.repository.SQLAlchemySyncSlugRepository[leaguemanager.models.Season]

Season repository.

model_type

None

repository_type

None

all_teams(season_id: uuid.UUID, active: bool = True) list[leaguemanager.models.Team]

Get all active teams for a given season.

Selects all teams based off their associaton to a TeamMembership object, which in turn is associated with a Season object. The Team must be active.

all_athletes(season_id: uuid.UUID, incl_inactive_team: bool = False) list[leaguemanager.models.Athlete]

Get all players for a given season.

Selects all players based off their associaton to a IndividualMembership object.

to_model_on_create(data: leaguemanager.models.ModelT | dict[str, Any]) leaguemanager.models.ModelT
to_model_on_update(data)
class leaguemanager.services.competition.season.SeasonAsyncService

Bases: leaguemanager.services.base.SQLAlchemyAsyncRepositoryService

Handles database operations for season data.

class SlugRepo

Bases: advanced_alchemy.repository.SQLAlchemyAsyncSlugRepository[leaguemanager.models.Season]

Season repository.

model_type

None

repository_type

None

async all_teams(season_id: uuid.UUID, active: bool = True) list[leaguemanager.models.Team]

Get all active teams for a given season.

Selects all teams based off their associaton to a TeamMembership object, which in turn is associated with a Season object. The Team must be active.

async all_athletes(season_id: uuid.UUID, incl_inactive_team: bool = False) list[leaguemanager.models.Athlete]

Get all players for a given season.

Selects all players based off their associaton to a IndividualMembership object.

async to_model_on_create(data: leaguemanager.models.ModelT | dict[str, Any]) leaguemanager.models.ModelT
async to_model_on_update(data)