feriennet.collections.match

Attributes

OccasionState

Classes

OccasionByStateRow

MatchCollection

Module Contents

class feriennet.collections.match.OccasionByStateRow[source]

Bases: NamedTuple

state: OccasionState | None[source]
occasion_id: uuid.UUID[source]
title: str[source]
start: datetime.datetime[source]
end: datetime.datetime[source]
min_spots: int[source]
max_spots: int[source]
min_age: int[source]
max_age: int[source]
accepted_bookings: int[source]
other_bookings: int[source]
total_bookings: int[source]
period_id: uuid.UUID[source]
feriennet.collections.match.OccasionState: TypeAlias = Literal['cancelled', 'overfull', 'empty', 'unoperable', 'operable', 'full'][source]
class feriennet.collections.match.MatchCollection(session: sqlalchemy.orm.Session, period: Period | PeriodMeta, states: Collection[OccasionState] | None = None)[source]
session[source]
period[source]
states[source]
property period_id: uuid.UUID[source]
for_period(period: Period | PeriodMeta) Self[source]
for_filter(state: OccasionState | None = None) Self[source]
property happiness: float[source]
property occasions_by_state: sqlalchemy.sql.selectable.Alias[source]
property operability: float[source]
include_in_output(occasion: OccasionByStateRow) bool[source]
property occasions: Query[OccasionByStateRow][source]