ScheduleDto typedef

ScheduleDto = ({List<ReferenceDto>? classes, ReferenceDto? course, double? credits, int? hours, String? language, String? number, int? phase, String? remarks, List<(DayOfWeek, Period, ReferenceDto?)>? schedule, String? status, String? syllabusId, ReferenceDto? teacher, String? type})

Course schedule entry from the course selection system.

Implementation

typedef ScheduleDto = ({
  /// Course offering number (e.g., "313146", "352902").
  String? number,

  /// Reference to the course.
  ReferenceDto? course,

  /// Course sequence phase/stage number (階段, e.g., "1", "2").
  int? phase,

  /// Number of credits for this course.
  double? credits,

  /// Number of hours per week.
  int? hours,

  /// Type of course (e.g., "必", "選", "通", "輔").
  String? type,

  /// Reference to the instructor.
  ReferenceDto? teacher,

  /// List of class/program references this course belongs to.
  List<ReferenceDto>? classes,

  /// Weekly schedule as list of (day, period, classroom) tuples.
  ///
  /// Each entry includes the classroom for that specific timeslot, as some
  /// courses use different rooms for different sessions.
  List<(DayOfWeek, Period, ReferenceDto?)>? schedule,

  /// Enrollment status for special cases (e.g., "撤選" for withdrawal).
  ///
  /// Normally null for regular enrolled courses.
  String? status,

  /// Language of instruction.
  String? language,

  /// Syllabus identifier for fetching course syllabus.
  String? syllabusId,

  /// Additional remarks or notes about the course.
  String? remarks,
});