namespace SIGCM2.Application.Abstractions.Persistence;
///
/// Query-only access to Aviso counts by Rubro.
/// CAT-002 introduces the contract. The real Dapper-based impl lands in PRD-002
/// (when dbo.Aviso exists). Until then, NullAvisoQueryRepository is the binding.
///
public interface IAvisoQueryRepository
{
///
/// Returns the count of avisos (active, non-archived) assigned to the given rubro.
///
Task CountAvisosEnRubroAsync(int rubroId, CancellationToken ct = default);
///
/// Returns a dictionary of { rubroId → count } for the provided ids.
/// Used by GetRubroTreeQueryHandler to avoid N+1 when populating TieneAvisos per node.
/// The implementation MUST do a single query; the stub returns an empty dictionary
/// (every rubro gets 0 via dictionary.GetValueOrDefault).
///
Task> CountAvisosBatchAsync(
IReadOnlyCollection rubroIds,
CancellationToken ct = default);
}