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

namespace CMSMicroservice.Application.ProductCategoryCQ.EventHandlers;

public class DeleteProductCategoryEventHandler : INotificationHandler<DeleteProductCategoryEvent>
{
    private readonly ILogger<
        DeleteProductCategoryEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
