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

namespace CMSMicroservice.Application.CategoryCQ.EventHandlers;

public class DeleteCategoryEventHandler : INotificationHandler<DeleteCategoryEvent>
{
    private readonly ILogger<DeleteCategoryEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}

