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

namespace CMSMicroservice.Application.UserCQ.EventHandlers;

public class UpdateUserEventHandler : INotificationHandler<UpdateUserEvent>
{
    private readonly ILogger<UpdateUserEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
