using MediatR;
using WhatsAppService.Domain.AggregatesModel.WhatsAppAccountAggregate;

namespace WhatsAppService.Domain.Events;

/// <summary>
/// EN: Domain event raised when WhatsApp account status changes.
/// VI: Domain event được phát ra khi trạng thái WhatsApp account thay đổi.
/// </summary>
public class WhatsAppAccountStatusChangedEvent : INotification
{
    /// <summary>
    /// EN: The WhatsApp account ID.
    /// VI: ID của WhatsApp account.
    /// </summary>
    public Guid AccountId { get; }

    /// <summary>
    /// EN: The previous account status.
    /// VI: Trạng thái account trước đó.
    /// </summary>
    public WhatsAppAccountStatus PreviousStatus { get; }

    /// <summary>
    /// EN: The new account status.
    /// VI: Trạng thái account mới.
    /// </summary>
    public WhatsAppAccountStatus NewStatus { get; }

    public WhatsAppAccountStatusChangedEvent(Guid accountId, WhatsAppAccountStatus previousStatus, WhatsAppAccountStatus newStatus)
    {
        AccountId = accountId;
        PreviousStatus = previousStatus;
        NewStatus = newStatus;
    }
}
