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

namespace CMSMicroservice.Application.UserContractCQ.EventHandlers;

public class DeleteUserContractEventHandler : INotificationHandler<DeleteUserContractEvent>
{
    private readonly ILogger<
        DeleteUserContractEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
