using Books.Api.Domain.FiscalYears;
using Books.Api.EventFlow.ReadModels;

namespace Books.Api.EventFlow.Repositories;

public interface IFiscalYearRepository
{
    Task<FiscalYearReadModelDto?> GetByIdAsync(string id, CancellationToken cancellationToken = default);
    Task<IEnumerable<FiscalYearReadModelDto>> GetByIdsAsync(List<FiscalYearId> ids, CancellationToken cancellationToken = default);
    Task<IReadOnlyList<FiscalYearReadModelDto>> GetByCompanyIdAsync(string companyId, CancellationToken cancellationToken = default);
    Task<FiscalYearReadModelDto?> GetByCompanyAndDateAsync(string companyId, DateOnly date, CancellationToken cancellationToken = default);
    Task<bool> HasOverlappingYearAsync(string companyId, DateOnly startDate, DateOnly endDate, string? excludeId = null, CancellationToken cancellationToken = default);
}
