namespace ZB.MOM.WW.ScadaBridge.KpiHistory; /// /// Configuration for the KPI History component. Bound from the /// ScadaBridge:KpiHistory section of appsettings.json. Defaults /// reflect the design: a 60-second sampling cadence for the point-in-time /// Notification Outbox / Site Call Audit KPI snapshots, a 90-day central /// retention window with a daily purge sweep, and a 200-point default ceiling /// on the series returned to the Central UI trend charts. /// public sealed class KpiHistoryOptions { /// /// How often the recorder captures a KPI sample row (default 60 s). Must be /// strictly positive. /// public TimeSpan SampleInterval { get; set; } = TimeSpan.FromSeconds(60); /// /// Central retention window in days for recorded KPI samples (default 90, /// range [1, 3650]). Rows older than this are dropped by the purge /// sweep. /// public int RetentionDays { get; set; } = 90; /// /// How often the purge sweep drops expired sample rows (default 1 day). Must /// be strictly positive. /// public TimeSpan PurgeInterval { get; set; } = TimeSpan.FromDays(1); /// /// Default ceiling on the number of points returned in a single trend series /// query when the caller does not specify one (default 200, range /// [2, 5000]). At least two points are required to draw a line. /// public int DefaultMaxSeriesPoints { get; set; } = 200; }