Slot constructor
A reservable slot in the school's timetable.
Implementation
const factory Slot({
/// Unique identifier of this slot.
required int id,
/// The start time of this slot.
@JsonValue('startunit') required SlotTimeUnit startUnit,
/// The duration of this slot interpreted as [SlotTimeUnit]s.
required int duration,
/// The weekday this slot takes place on.
required Weekday weekday,
/// The room this slot takes place in.
required String room,
/// The number of students that can attend this slot.
required int size,
/// The number of students that have already reserved this slot.
@JsonValue('fullness') required int reservations,
/// `true` if the current user has reserved this slot.
@JsonValue('forcuruser') required bool reserved,
/// The user ids of those supervising this slot.
@Default([]) List<int> supervisors,
}) = _Slot;