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

namespace CMSMicroservice.Application.UserWalletCQ.EventHandlers;

public class UpdateUserWalletEventHandler : INotificationHandler<UpdateUserWalletEvent>
{
    private readonly ILogger<
        UpdateUserWalletEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
