33 lines
1.8 KiB
C#
33 lines
1.8 KiB
C#
using ROLAC.API.Entities.Base;
|
|
namespace ROLAC.API.Entities;
|
|
|
|
/// <summary>
|
|
/// Singleton (Id == 1) holding the editable SMTP + Line notification settings. This row — not the
|
|
/// "Smtp"/"Line" appsettings sections — is the runtime source of truth; those sections only seed
|
|
/// this row once on first startup. Read at send time via <c>INotificationSettingsService</c> so
|
|
/// edits apply without restarting the API.
|
|
///
|
|
/// Secrets (<see cref="SmtpPassword"/>, <see cref="LineChannelAccessToken"/>,
|
|
/// <see cref="LineChannelSecret"/>) are stored plaintext and protected by RBAC (the <c>Settings</c>
|
|
/// module / super_admin) per the project decision for this small single-VM internal app.
|
|
/// </summary>
|
|
public class NotificationSetting : AuditableEntity, IAuditable
|
|
{
|
|
public int Id { get; set; }
|
|
|
|
// ── Email (SMTP) ─────────────────────────────────────────────────────────
|
|
public bool EnableEmail { get; set; }
|
|
public string SmtpHost { get; set; } = "";
|
|
public int SmtpPort { get; set; } = 587;
|
|
public bool SmtpUseSsl { get; set; } = true; // true → STARTTLS
|
|
public string SmtpUser { get; set; } = "";
|
|
public string SmtpPassword { get; set; } = "";
|
|
public string FromAddress { get; set; } = "";
|
|
public string FromName { get; set; } = "";
|
|
|
|
// ── Line ─────────────────────────────────────────────────────────────────
|
|
public bool EnableLine { get; set; }
|
|
public string LineChannelAccessToken { get; set; } = "";
|
|
public string LineChannelSecret { get; set; } = "";
|
|
}
|