using WhatsAppService.Domain.SeedWork;

namespace WhatsAppService.Domain.AggregatesModel.WhatsAppAccountAggregate;

/// <summary>
/// EN: Repository interface for WhatsAppAccount aggregate root.
/// VI: Interface repository cho WhatsAppAccount aggregate root.
/// </summary>
public interface IWhatsAppAccountRepository : IRepository<WhatsAppAccount>
{
    /// <summary>
    /// EN: Add a new WhatsApp account.
    /// VI: Thêm một WhatsApp account mới.
    /// </summary>
    Task<WhatsAppAccount> AddAsync(WhatsAppAccount account, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Update an existing WhatsApp account.
    /// VI: Cập nhật một WhatsApp account đã tồn tại.
    /// </summary>
    void Update(WhatsAppAccount account);

    /// <summary>
    /// EN: Get a WhatsApp account by ID.
    /// VI: Lấy một WhatsApp account theo ID.
    /// </summary>
    Task<WhatsAppAccount?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get a WhatsApp account by shop ID.
    /// VI: Lấy một WhatsApp account theo shop ID.
    /// </summary>
    Task<WhatsAppAccount?> GetByShopIdAsync(Guid shopId, CancellationToken cancellationToken = default);

    /// <summary>
    /// EN: Get a WhatsApp account by phone number ID.
    /// VI: Lấy một WhatsApp account theo phone number ID.
    /// </summary>
    Task<WhatsAppAccount?> GetByPhoneNumberIdAsync(string phoneNumberId, CancellationToken cancellationToken = default);
}
