EnakPoint & EnakCoin wallet, PIN, outlet, order, community, reward

- 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>
This commit is contained in:
efrilm
2026-10-01 01:43:22 +07:00
co-authored by Claude Opus 5.5
parent 5954510b93
commit f5e3075205
253 changed files with 47212 additions and 17437 deletions
+10 -1
View File
@@ -1,7 +1,9 @@
part of '../game.dart';
@freezed
class Game with _$Game {
abstract class Game with _$Game {
const Game._();
const factory Game({
required String id,
required String name,
@@ -23,4 +25,11 @@ class Game with _$Game {
createdAt: '',
updatedAt: '',
);
/// Biaya sekali main dalam EnakCoin (`metadata.coin_cost`), default 1.
int get coinCost {
final value = metadata['coin_cost'];
final cost = value is num ? value.toInt() : int.tryParse('$value');
return cost == null || cost <= 0 ? 1 : cost;
}
}
@@ -1,7 +1,7 @@
part of '../game.dart';
@freezed
class GamePrize with _$GamePrize {
abstract class GamePrize with _$GamePrize {
const factory GamePrize({
required String id,
required String gameId,
@@ -0,0 +1,12 @@
part of '../game.dart';
@freezed
abstract class SpinResult with _$SpinResult {
const factory SpinResult({
required String gamePlayId,
required int coinsUsed,
required String prizeId,
required String prizeName,
required int coinsRemaining,
}) = _SpinResult;
}
+1
View File
@@ -7,5 +7,6 @@ part 'game.freezed.dart';
part 'entity/game_entity.dart';
part 'entity/game_prize_entity.dart';
part 'entity/spin_result_entity.dart';
part 'failures/game_failure.dart';
part 'repositories/i_game_repository.dart';
File diff suppressed because it is too large Load Diff
@@ -2,4 +2,7 @@ part of '../game.dart';
abstract class IGameRepository {
Future<Either<GameFailure, Game>> ferrisWheel();
/// Main satu kali; memotong EnakCoin sebesar biaya game. Tanpa PIN.
Future<Either<GameFailure, SpinResult>> spin({required String gameId});
}