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

namespace CMSMicroservice.Application.TransactionsCQ.EventHandlers;

public class DeleteTransactionsEventHandler : INotificationHandler<DeleteTransactionsEvent>
{
    private readonly ILogger<
        DeleteTransactionsEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
