Files
register-referentie/services/domain/Big.Application/HerregistratieReminderSweep.cs
T
not 3c841c04bd test(domain): herregistratie reminder sweep flags + returns due inscriptions (refs #18)
HerregistratieReminderSweep reminds every due inscription, persists the flag so a
re-fire is a no-op, and returns the reminded ids. Stubbed to an empty result so
the new tests fail; green implements the sweep. Adds a FixedClock TimeProvider
fake so the sweep is deterministic without a testing package.

refs #18
2026-07-23 11:54:38 +02:00

19 lines
1.0 KiB
C#

using Big.Domain;
namespace Big.Application;
/// <summary>
/// The herregistratie reminder sweep (S-17): find the inscriptions whose herregistratie deadline is
/// within the reminder window and have not yet been reminded, mark each reminded, and persist it. Pure
/// application logic over ports — it knows nothing of Quartz; the scheduled job that fires it on a cron
/// lives in Infrastructure (mirroring how the pumps' processors are pure and the pump is the shell).
/// Idempotent: <see cref="Registration.MarkHerregistratieReminderVerstuurd"/> drops an inscription from
/// the next sweep's candidate set, so a re-fire reminds no one twice. Returns the reminded ids so the
/// caller can observe the sweep's effect — the reminder itself is the flag persisted on the aggregate.
/// </summary>
public sealed class HerregistratieReminderSweep(IRegistrationStore store, TimeProvider clock)
{
public Task<IReadOnlyList<RegistrationId>> SweepAsync(CancellationToken ct = default)
=> Task.FromResult<IReadOnlyList<RegistrationId>>([]); // RED stub
}