namespace WalletService.Domain.Events;

using MediatR;

/// <summary>
/// EN: Domain event raised when a payment fails.
/// VI: Domain event duoc phat ra khi thanh toan that bai.
/// </summary>
public class PaymentFailedDomainEvent : INotification
{
    public Guid PaymentId { get; }
    public Guid OrderId { get; }
    public string? ErrorCode { get; }
    public string? ErrorMessage { get; }
    public DateTime OccurredAt { get; }

    public PaymentFailedDomainEvent(
        Guid paymentId,
        Guid orderId,
        string? errorCode,
        string? errorMessage)
    {
        PaymentId = paymentId;
        OrderId = orderId;
        ErrorCode = errorCode;
        ErrorMessage = errorMessage;
        OccurredAt = DateTime.UtcNow;
    }
}
