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

namespace CMSMicroservice.Application.UserRoleCQ.EventHandlers;

public class DeleteUserRoleEventHandler : INotificationHandler<DeleteUserRoleEvent>
{
    private readonly ILogger<DeleteUserRoleEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
