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

namespace CMSMicroservice.Application.ProductCategoryCQ.EventHandlers;

public class UpdateProductCategoryEventHandler : INotificationHandler<UpdateProductCategoryEvent>
{
    private readonly ILogger<
        UpdateProductCategoryEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
