using CMSMicroservice.Domain.Events;
using Microsoft.Extensions.Logging;

namespace CMSMicroservice.Application.ProductImagesCQ.EventHandlers;

public class CreateNewProductImagesEventHandler : INotificationHandler<CreateNewProductImagesEvent>
{
    private readonly ILogger<
        CreateNewProductImagesEventHandler> _logger;

    public CreateNewProductImagesEventHandler(ILogger<CreateNewProductImagesEventHandler> logger)
    {
        _logger = logger;
    }

    public Task Handle(CreateNewProductImagesEvent notification, CancellationToken cancellationToken)
    {
        _logger.LogInformation("Domain Event: {DomainEvent}", notification.GetType().Name);

        return Task.CompletedTask;
    }
}
