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

namespace CMSMicroservice.Application.FactorDetailsCQ.EventHandlers;

public class CreateNewFactorDetailsEventHandler : INotificationHandler<CreateNewFactorDetailsEvent>
{
    private readonly ILogger<
        CreateNewFactorDetailsEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
