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

namespace CMSMicroservice.Application.TransactionsCQ.EventHandlers;

public class UpdateTransactionsEventHandler : INotificationHandler<UpdateTransactionsEvent>
{
    private readonly ILogger<
        UpdateTransactionsEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
