@@ -9,6 +9,10 @@ public class ChurchProfile : AuditableEntity, IAuditable
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
public string? NameZh { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? Website { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public string? City { get; set; }
|
||||
public string? State { get; set; }
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
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; } = "";
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using ROLAC.API.Entities.Base;
|
||||
namespace ROLAC.API.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton (Id == 1) holding site-wide presentation and locale settings, edited from the
|
||||
/// Church Profile → Site Settings tab (gated by the <c>Settings</c> permission module).
|
||||
/// Seeded with sensible defaults on startup.
|
||||
/// </summary>
|
||||
public class SiteSetting : AuditableEntity, IAuditable
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string SiteTitle { get; set; } = "";
|
||||
public string? SiteTitleZh { get; set; }
|
||||
public string DefaultLanguage { get; set; } = "en"; // "en" | "zh"
|
||||
public string TimeZone { get; set; } = "America/Los_Angeles";
|
||||
public string DateFormat { get; set; } = "yyyy-MM-dd";
|
||||
public string Currency { get; set; } = "USD";
|
||||
}
|
||||
Reference in New Issue
Block a user