using AdsTrackingService.Domain.SeedWork;

namespace AdsTrackingService.Domain.AggregatesModel.ConversionAggregate;

/// <summary>
/// EN: Repository interface for Conversion aggregate.
/// VI: Interface repository cho aggregate Conversion.
/// </summary>
public interface IConversionRepository : IRepository<Conversion>
{
    /// <summary>
    /// EN: Get conversions by campaign ID with pagination.
    /// VI: Lấy conversions theo campaign ID có phân trang.
    /// </summary>
    Task<IEnumerable<Conversion>> GetByCampaignIdAsync(
        Guid campaignId, 
        int skip, 
        int take, 
        CancellationToken ct = default);

    /// <summary>
    /// EN: Get conversions by user ID.
    /// VI: Lấy conversions theo user ID.
    /// </summary>
    Task<IEnumerable<Conversion>> GetByUserIdAsync(Guid userId, CancellationToken ct = default);

    /// <summary>
    /// EN: Get conversions within time range.
    /// VI: Lấy conversions trong khoảng thời gian.
    /// </summary>
    Task<IEnumerable<Conversion>> GetByTimeRangeAsync(
        DateTime from, 
        DateTime to, 
        CancellationToken ct = default);
}
