namespace Campaign_Tracker.Server.ExtensionData;
///
/// Result of a nightly (or on-demand) extension-to-legacy referential integrity check (AC #4).
/// Targeting at least 99.9% (NFR13).
///
public sealed record LegacyLinkIntegrityReport(
DateTimeOffset CheckedAt,
int TotalRecords,
int ConsistentRecords,
int FailedRecords,
double ConsistencyPercentage,
IReadOnlyList Failures)
{
/// True when no failures were detected (or no records exist to check).
public bool IsConsistent => FailedRecords == 0;
}
/// Describes one extension record that failed to resolve its legacy link.
public sealed record LegacyLinkIntegrityFailure(
string RecordType,
string RecordId,
LegacyLinkReference Reference,
string Reason);