- Wallet EnakPoint & EnakCoin: beranda, riwayat, saldo kedaluwarsa, kode bayar, tukar EnakCoin, transfer - PIN (buat, ganti, lupa), outlet, riwayat order, game spin - Halaman community, webview, coming soon, dan ikon menu beranda baru - Redesign Reward Saya: kartu tiket, filter chip, detail kode + QR - Hapus customer point loader, menu, dan checkout lama - Base URL ke enaklo-pos-api.altru.id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
867 B
Dart
31 lines
867 B
Dart
part of '../wallet.dart';
|
|
|
|
@freezed
|
|
abstract class WalletSummary with _$WalletSummary {
|
|
const factory WalletSummary({
|
|
required int pointBalance,
|
|
required int coinBalance,
|
|
required int pointValue,
|
|
required int pointDiscountValue,
|
|
ExpiringAmount? nearestExpiringPoint,
|
|
ExpiringAmount? nearestExpiringCoin,
|
|
required List<WalletTransaction> recentTransactions,
|
|
}) = _WalletSummary;
|
|
|
|
factory WalletSummary.empty() => const WalletSummary(
|
|
pointBalance: 0,
|
|
coinBalance: 0,
|
|
pointValue: 0,
|
|
pointDiscountValue: 0,
|
|
recentTransactions: [],
|
|
);
|
|
}
|
|
|
|
/// Jumlah saldo yang akan hangus pada [date] (tanggal WIB, berlaku sampai
|
|
/// 23:59:59 WIB di tanggal itu).
|
|
@freezed
|
|
abstract class ExpiringAmount with _$ExpiringAmount {
|
|
const factory ExpiringAmount({required int amount, required DateTime date}) =
|
|
_ExpiringAmount;
|
|
}
|