Files
enaklo-flutter/lib/domain/wallet/entities/exchange_entity.dart
T

34 lines
834 B
Dart
Raw Normal View History

part of '../wallet.dart';
@freezed
abstract class ExchangePreview with _$ExchangePreview {
const factory ExchangePreview({
required int coinAmount,
required int pointAmount,
required int coinBalance,
required int coins,
required int points,
required bool valid,
String? reason,
}) = _ExchangePreview;
}
@freezed
abstract class ExchangeResult with _$ExchangeResult {
const factory ExchangeResult({
required int coins,
required int points,
required int coinBalance,
required int pointBalance,
required List<WalletLot> lots,
required bool replayed,
}) = _ExchangeResult;
}
/// Bagian saldo dengan tanggal kedaluwarsanya sendiri.
@freezed
abstract class WalletLot with _$WalletLot {
const factory WalletLot({required int amount, DateTime? expiresAt}) =
_WalletLot;
}