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

namespace CMSMicroservice.Application.UserOrderCQ.EventHandlers;

public class SubmitShopBuyOrderEventHandler : INotificationHandler<SubmitShopBuyOrderEvent>
{
    private readonly ILogger<
        SubmitShopBuyOrderEventHandler> _logger;

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

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

        return Task.CompletedTask;
    }
}
