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

namespace CMSMicroservice.Application.ContractCQ.EventHandlers;

public class UpdateContractEventHandler : INotificationHandler<UpdateContractEvent>
{
    private readonly ILogger<
        UpdateContractEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
