HRM-10/HRM.BO/Configuration/CalendarSettings.cs
Mohaimen Hasan 838b8d4480 first commit
2026-11-03 13:06:00 +06:00

59 lines
3.0 KiB
C#

namespace HRM.BO.Configuration
{
/// <summary>
/// "Calendar" section of appsettings.json. Bound through the normal ASP.NET configuration, so
/// appsettings.Development.json can override it (for example to stop real e-mails on a developer PC).
/// Each client deployment has its own appsettings.json, so per-client choices live here too.
/// </summary>
public class CalendarSettings
{
/// <summary>Runs the per-minute Hangfire job that sends reminders. False stops all reminders.</summary>
public bool RemindersEnabled { get; set; } = true;
/// <summary>Sends calendar e-mails. False keeps in-app (bell) notifications only.</summary>
public bool SendMail { get; set; } = true;
/// <summary>
/// For testing: when set, every calendar e-mail goes to this address instead of the real person.
/// In the Development environment e-mails are sent only when this is set.
/// </summary>
public string RedirectAllMailTo { get; set; } = string.Empty;
/// <summary>A reminder that is older than this (for example after the server was down) is skipped, not sent late.</summary>
public int ReminderGraceMinutes { get; set; } = 60;
/// <summary>
/// Time zone written into Outlook invitations, as an IANA id (e.g. "Asia/Dhaka") or Windows id
/// (e.g. "Bangladesh Standard Time"). Empty = the server's own time zone.
/// </summary>
public string TimeZoneId { get; set; } = string.Empty;
/// <summary>
/// Domain part of the invitation's unique id (UID = "hrm-calendar-{id}@{domain}"), so Outlook recognises later
/// updates and cancellations of the same item. Empty = the domain of EmailSettings.FromAddress.
/// </summary>
public string IcsDomain { get; set; } = string.Empty;
/// <summary>How items reach Outlook: "None", "Ics" (e-mail meeting invitation) or "Graph" (Microsoft 365, later phase).</summary>
public EnumOutlookSyncMode OutlookSync { get; set; } = EnumOutlookSyncMode.Ics;
// Fixed rules, not settings: every employee may create events and invite anyone; line managers may assign tasks to
// their own team (HR / admin to anyone); everyone sees only their own birthday and work anniversary.
/// <summary>
/// Runs HR's schedule jobs (tasks created by themselves on set dates) from the per-minute job. False stops all runs;
/// runs that fall due meanwhile are not made up later.
/// </summary>
public bool ScheduleJobsEnabled { get; set; } = true;
/// <summary>
/// Sends HR's schedule emails (an e-mail that goes out by itself on set dates, logged in the central e-mail log)
/// from the per-minute job. False stops all of them; runs that fall due meanwhile are not made up later.
/// </summary>
public bool ScheduleEmailsEnabled { get; set; } = true;
/// <summary>Most people one calendar item can have.</summary>
public int MaxAttendees { get; set; } = 500;
}
}