namespace WalletService.API.Application.Queries.Payments;

using MediatR;

/// <summary>
/// EN: Query to get a payment by order ID.
/// VI: Query de lay thanh toan theo ma don hang.
/// </summary>
public record GetPaymentByOrderIdQuery(Guid OrderId) : IRequest<PaymentDto?>;

/// <summary>
/// EN: Query to get a payment by gateway transaction ID.
/// VI: Query de lay thanh toan theo ma giao dich cong thanh toan.
/// </summary>
public record GetPaymentByTransactionIdQuery(string TransactionId) : IRequest<PaymentDto?>;

/// <summary>
/// EN: DTO representing a payment transaction.
/// VI: DTO dai dien cho giao dich thanh toan.
/// </summary>
public record PaymentDto(
    Guid PaymentId,
    Guid OrderId,
    decimal Amount,
    string Currency,
    string GatewayName,
    string? TransactionId,
    string? PaymentUrl,
    string Status,
    string? ErrorCode,
    string? ErrorMessage,
    DateTime CreatedAt,
    DateTime? CompletedAt
);
