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

namespace CMSMicroservice.Application.ContractCQ.EventHandlers;

public class CreateNewContractEventHandler : INotificationHandler<CreateNewContractEvent>
{
    private readonly ILogger<
        CreateNewContractEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
