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

namespace CMSMicroservice.Application.UserOrderCQ.EventHandlers;

public class DeleteUserOrderEventHandler : INotificationHandler<DeleteUserOrderEvent>
{
    private readonly ILogger<DeleteUserOrderEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
