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

namespace CMSMicroservice.Application.ProductTagCQ.EventHandlers;

public class CreateNewProductTagEventHandler : INotificationHandler<CreateNewProductTagEvent>
{
    private readonly ILogger<CreateNewProductTagEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}

