using AdsManagerService.Domain.AggregatesModel.CampaignAggregate;
using MediatR;

namespace AdsManagerService.Domain.Events;

/// <summary>
/// EN: Domain event raised when a new campaign is created.
/// VI: Domain event phát ra khi chiến dịch mới được tạo.
/// </summary>
public class CampaignCreatedDomainEvent : INotification
{
    public Campaign Campaign { get; }

    public CampaignCreatedDomainEvent(Campaign campaign)
    {
        Campaign = campaign;
    }
}

/// <summary>
/// EN: Domain event raised when a campaign is activated.
/// VI: Domain event phát ra khi chiến dịch được kích hoạt.
/// </summary>
public class CampaignActivatedDomainEvent : INotification
{
    public Guid CampaignId { get; }
    public CampaignStatus PreviousStatus { get; }
    public CampaignStatus NewStatus { get; }

    public CampaignActivatedDomainEvent(Guid campaignId, CampaignStatus previousStatus, CampaignStatus newStatus)
    {
        CampaignId = campaignId;
        PreviousStatus = previousStatus;
        NewStatus = newStatus;
    }
}

/// <summary>
/// EN: Domain event raised when campaign status changes.
/// VI: Domain event phát ra khi trạng thái chiến dịch thay đổi.
/// </summary>
public class CampaignStatusChangedDomainEvent : INotification
{
    public Guid CampaignId { get; }
    public CampaignStatus PreviousStatus { get; }
    public CampaignStatus NewStatus { get; }

    public CampaignStatusChangedDomainEvent(Guid campaignId, CampaignStatus previousStatus, CampaignStatus newStatus)
    {
        CampaignId = campaignId;
        PreviousStatus = previousStatus;
        NewStatus = newStatus;
    }
}
