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

namespace CMSMicroservice.Application.UserOrderCQ.EventHandlers;

public class UpdateUserOrderEventHandler : INotificationHandler<UpdateUserOrderEvent>
{
    private readonly ILogger<UpdateUserOrderEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
