11 lines
604 B
C#
11 lines
604 B
C#
// Discriminated result — allows tests and callers to assert the exact outcome
|
|
// without inspecting PostgreSQL or Redis directly.
|
|
public record SirsResult(SirsOutcome Outcome, int ActiveCount = 0)
|
|
{
|
|
public static readonly SirsResult NotSirsCode = new(SirsOutcome.NotSirsCode);
|
|
public static readonly SirsResult AlertCreated = new(SirsOutcome.AlertCreated);
|
|
public static readonly SirsResult AlertAlreadyOpen = new(SirsOutcome.AlertAlreadyOpen);
|
|
|
|
public static SirsResult InsufficientCriteria(int count) =>
|
|
new(SirsOutcome.InsufficientCriteria, count);
|
|
} |