using MediatR;
using FacebookService.Domain.AggregatesModel.ConversationAggregate;

namespace FacebookService.Domain.Events;

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

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

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

    public ConversationStatusChangedDomainEvent(
        Guid conversationId, 
        ConversationStatus previousStatus, 
        ConversationStatus newStatus)
    {
        ConversationId = conversationId;
        PreviousStatus = previousStatus;
        NewStatus = newStatus;
    }
}
