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

namespace WhatsAppService.Domain.Events;

/// <summary>
/// EN: Domain event raised when a WhatsApp account is connected.
/// VI: Domain event được phát ra khi một WhatsApp account được kết nối.
/// </summary>
public class WhatsAppAccountConnectedEvent : INotification
{
    /// <summary>
    /// EN: The connected WhatsApp account.
    /// VI: WhatsApp account đã kết nối.
    /// </summary>
    public WhatsAppAccount Account { get; }

    /// <summary>
    /// EN: The shop ID that owns this account.
    /// VI: Shop ID sở hữu account này.
    /// </summary>
    public Guid ShopId { get; }

    /// <summary>
    /// EN: The phone number ID of the connected account.
    /// VI: Phone number ID của account đã kết nối.
    /// </summary>
    public string PhoneNumberId { get; }

    public WhatsAppAccountConnectedEvent(WhatsAppAccount account)
    {
        Account = account;
        ShopId = account.ShopId;
        PhoneNumberId = account.PhoneNumberId;
    }
}
