mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 18:53:12 +00:00
Dispatchers can attach one evidence file, and create links it only after that document has passed scanning.
54 lines
2 KiB
C#
54 lines
2 KiB
C#
namespace SeaHaven.Services.Configuration;
|
|
|
|
public sealed class FrontendOptions
|
|
{
|
|
public string FrontendBaseUrl { get; set; } = string.Empty;
|
|
}
|
|
|
|
public sealed class JwtOptions
|
|
{
|
|
public const string SectionName = "JWT";
|
|
|
|
public string Secret { get; set; } = string.Empty;
|
|
public string? ValidIssuer { get; set; }
|
|
public string? ValidAudience { get; set; }
|
|
}
|
|
|
|
public sealed class ApprovalsOptions
|
|
{
|
|
public const string SectionName = "Approvals";
|
|
|
|
public decimal? UpliftTier1MaxUsd { get; set; }
|
|
public string[] Tier1Roles { get; set; } = Array.Empty<string>();
|
|
public string[] Tier2Roles { get; set; } = Array.Empty<string>();
|
|
|
|
// SH-101 uplift lifecycle configuration. Defaults preserve a safe behavior.
|
|
public int? ExpirationHours { get; set; } = 72;
|
|
public int? EscalationAfterHours { get; set; } = 48;
|
|
public int SweepIntervalSeconds { get; set; } = 300;
|
|
public string[] Tier1NotificationRecipients { get; set; } = Array.Empty<string>();
|
|
public string[] Tier2NotificationRecipients { get; set; } = Array.Empty<string>();
|
|
public string[] EscalationRecipients { get; set; } = Array.Empty<string>();
|
|
|
|
public TimeSpan EffectiveExpiration => TimeSpan.FromHours(ExpirationHours is > 0 ? ExpirationHours.Value : 72);
|
|
public TimeSpan EffectiveEscalation => TimeSpan.FromHours(EscalationAfterHours is > 0 ? EscalationAfterHours.Value : 48);
|
|
public TimeSpan EffectiveSweepInterval => TimeSpan.FromSeconds(SweepIntervalSeconds is > 0 ? SweepIntervalSeconds : 300);
|
|
}
|
|
|
|
public sealed class VendorPortalOptions
|
|
{
|
|
public const string SectionName = "VendorPortal";
|
|
|
|
public int? TokenLifetimeDays { get; set; }
|
|
}
|
|
|
|
public sealed class VendorDocumentsOptions
|
|
{
|
|
public const string SectionName = "VendorDocuments";
|
|
|
|
public long MaxSizeBytes { get; set; } = 10 * 1024 * 1024;
|
|
|
|
// why: local Development has no ClamAV host, so a required scan would leave every
|
|
// uplift file Pending. Production leaves this false and keeps the file quarantined.
|
|
public bool PassWhenScannerUnavailable { get; set; }
|
|
}
|