CalendarEventDto typedef

CalendarEventDto = ({String? allDay, String? calContent, int? calEnd, String? calPlace, int? calStart, String? calTitle, String? creatorName, int? id, String? isHoliday, String? ownerName})

Represents a calendar event from the NTUT Portal.

Events come in two flavors:

  • Named events with id, calTitle, ownerName, creatorName (e.g., exam periods, registration deadlines)
  • Holiday markers with isHoliday = "1" and an empty title (weekends and national holidays)

Implementation

typedef CalendarEventDto = ({
  /// Event ID (absent for holiday markers).
  int? id,

  /// Event start time (epoch milliseconds).
  int? calStart,

  /// Event end time (epoch milliseconds).
  int? calEnd,

  /// Whether this is an all-day event ("1" = yes).
  String? allDay,

  /// Event title / description.
  String? calTitle,

  /// Event location.
  String? calPlace,

  /// Event content / details.
  String? calContent,

  /// Owner name (e.g., "學校行事曆").
  String? ownerName,

  /// Creator name (e.g., "教務處").
  String? creatorName,

  /// Whether this is a holiday ("1" = yes).
  String? isHoliday,
});