namespace ZB.MOM.WW.ScadaBridge.SiteEventLogging; public class SiteEventLogOptions { /// Number of days to retain site event log entries before purge; default 30. public int RetentionDays { get; set; } = 30; /// Maximum SQLite database size in megabytes before old entries are purged; default 1024 MB. public int MaxStorageMb { get; set; } = 1024; /// /// MIGRATION-ONLY as of LocalDb Phase 1. no longer reads /// this: site_events lives in the consolidated site database at /// LocalDb:Path. The only remaining consumer is /// SiteLocalDbLegacyMigrator, which uses it to locate a pre-Phase-1 /// site_events.db and copy it in once. Safe to delete from a config once that /// node's migration has run. /// public string DatabasePath { get; set; } = "site_events.db"; /// Maximum number of rows returned per paginated query; default 500. public int QueryPageSize { get; set; } = 500; /// /// Hard upper bound on a caller-supplied PageSize. A /// misbehaving or hostile central client that requests int.MaxValue would /// otherwise force the query to materialise the entire log into a single list while /// holding the shared write lock. Silent clamp; default 500 matches /// . /// public int MaxQueryPageSize { get; set; } = 500; /// Interval between purge runs; default 24 hours. public TimeSpan PurgeInterval { get; set; } = TimeSpan.FromHours(24); /// /// Bound on the background write queue. Default 10 000 events. /// Overflow uses BoundedChannelFullMode.DropOldest — callers never block; the /// dropped event's Task is faulted and FailedWriteCount is incremented /// so the drop is observable. /// public int WriteQueueCapacity { get; set; } = 10_000; }