namespace WalletService.API.Application.Commands;

using MediatR;

/// <summary>
/// EN: Command to exchange currency within a wallet.
/// VI: Command để quy đổi tiền tệ trong ví.
/// </summary>
public record ExchangeCommand(
    Guid UserId,
    decimal FromAmount,
    int FromCurrencyTypeId,
    int ToCurrencyTypeId,
    decimal? CustomRate = null
) : IRequest<ExchangeResult>;

/// <summary>
/// EN: Result of exchange operation.
/// VI: Kết quả của thao tác quy đổi.
/// </summary>
public record ExchangeResult(
    Guid WalletId,
    decimal FromAmount,
    string FromCurrency,
    decimal ToAmount,
    string ToCurrency,
    decimal ExchangeRate,
    DateTime ExchangedAt
);
