34 lines
1.2 KiB
C#
34 lines
1.2 KiB
C#
namespace Elternbeirat.Web.Services;
|
|
|
|
/// <summary>
|
|
/// A single calendar entry (parents' evening, meeting, deadline). Read from
|
|
/// <c>Content/events.yml</c> at startup. All display text is German because it
|
|
/// is visitor-facing content.
|
|
/// </summary>
|
|
public sealed class Event
|
|
{
|
|
/// <summary>Short title shown in the list and the calendar.</summary>
|
|
public required string Title { get; init; }
|
|
|
|
/// <summary>
|
|
/// When the entry starts. A date-only entry (no time) is treated as an
|
|
/// all-day event; see <see cref="HasTime"/>.
|
|
/// </summary>
|
|
public required DateTime Start { get; init; }
|
|
|
|
/// <summary>
|
|
/// True when <see cref="Start"/> carries a wall-clock time, false for an
|
|
/// all-day entry. Drives both the list formatting and the ICS export.
|
|
/// </summary>
|
|
public required bool HasTime { get; init; }
|
|
|
|
/// <summary>Optional end, for multi-hour or multi-day entries.</summary>
|
|
public DateTime? End { get; init; }
|
|
|
|
/// <summary>Optional location, e.g. "Aula" or "Mensa".</summary>
|
|
public string? Location { get; init; }
|
|
|
|
/// <summary>Optional free-text note shown below the entry.</summary>
|
|
public string? Note { get; init; }
|
|
}
|