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

namespace CMSMicroservice.Application.UserContractCQ.EventHandlers;

public class UpdateUserContractEventHandler : INotificationHandler<UpdateUserContractEvent>
{
    private readonly ILogger<
        UpdateUserContractEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
