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

namespace CMSMicroservice.Application.UserRoleCQ.EventHandlers;

public class UpdateUserRoleEventHandler : INotificationHandler<UpdateUserRoleEvent>
{
    private readonly ILogger<UpdateUserRoleEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
