namespace HSchool.Content; /// Bells and breaks of one school day. A catalog may have only one concrete frame. public sealed class DayFrameDef : Def { /// Local game-clock time of the first lesson, HH:mm. public string FirstLesson { get; init; } = "08:30"; public int LessonCount { get; init; } public int LessonMinutes { get; init; } public int BreakMinutes { get; init; } /// The long break follows this 1-based lesson. Zero means every break is short. public int LongBreakAfter { get; init; } public int LongBreakMinutes { get; init; } /// /// Which break each parallel eats at. Empty means one sitting for the whole school, at /// . Every listed break is a long one, so a school that feeds its /// juniors and seniors separately gets two wide breaks rather than one crowded canteen. /// public IReadOnlyList LunchBreaks { get; init; } = []; } /// One lunch sitting: the break it happens at and the parallels it feeds. public sealed class LunchBreakDef { /// The sitting fills the break after this 1-based lesson. public int AfterLesson { get; init; } public int GradeMin { get; init; } public int GradeMax { get; init; } public bool Covers(int year) => year >= GradeMin && year <= GradeMax; } public sealed class MonthDay { public int Month { get; init; } public int Day { get; init; } } /// /// A holiday range in month-day, repeating every academic year. When start is after end /// (winter), the range wraps across 1 January. /// public sealed class HolidayDef : Def { public MonthDay Start { get; init; } = new(); public MonthDay End { get; init; } = new(); }