using MktXService.Domain.SeedWork;

namespace MktXService.Domain.AggregatesModel.CampaignAggregate;

/// <summary>
/// EN: Repository interface for Campaign aggregate.
/// VI: Interface repository cho Campaign aggregate.
/// </summary>
public interface ICampaignRepository : IRepository<Campaign>
{
    Campaign Add(Campaign campaign);
    void Update(Campaign campaign);
    void Delete(Campaign campaign);
    Task<Campaign?> GetByIdAsync(Guid id);
    Task<IEnumerable<Campaign>> GetByMerchantIdAsync(Guid merchantId, int skip = 0, int take = 20);
    Task<IEnumerable<Campaign>> GetByStatusAsync(Guid merchantId, CampaignStatus status);
    Task<IEnumerable<Campaign>> GetScheduledCampaignsAsync(DateTime beforeTime);
    Task<int> CountByMerchantIdAsync(Guid merchantId);
}
