using Marathon.Domain.Entities;
namespace Marathon.Application.Abstractions;
///
/// Repository for domain entities.
///
public interface IAnomalyRepository : IRepository
{
///
/// Server-side count of anomalies detected strictly after .
/// Backs the unread badge without materialising the table.
///
Task CountSinceAsync(DateTimeOffset since, CancellationToken ct = default);
///
/// Anomalies whose falls in the inclusive
/// [..] window (either bound may be
/// null for open-ended), ordered newest-first. Pushes the temporal filter to SQL;
/// severity / sport filtering remains a service concern (needs the event join).
///
Task> ListByDateRangeAsync(
DateTimeOffset? from,
DateTimeOffset? to,
CancellationToken ct = default);
}