Game Prize and Logout

This commit is contained in:
efrilm
2025-09-18 10:39:54 +07:00
parent 006486bc2a
commit 3c596461c6
31 changed files with 4189 additions and 677 deletions
+24
View File
@@ -0,0 +1,24 @@
part of '../game.dart';
@freezed
class Game with _$Game {
const factory Game({
required String id,
required String name,
required String type,
required bool isActive,
required Map<String, dynamic> metadata,
required String createdAt,
required String updatedAt,
}) = _Game;
factory Game.empty() => const Game(
id: '',
name: '',
type: '',
isActive: false,
metadata: {},
createdAt: '',
updatedAt: '',
);
}
@@ -0,0 +1,32 @@
part of '../game.dart';
@freezed
class GamePrize with _$GamePrize {
const factory GamePrize({
required String id,
required String gameId,
required String name,
required int weight,
required int stock,
required int maxStock,
required int threshold,
required Map<String, dynamic> metadata,
required Game game,
required String createdAt,
required String updatedAt,
}) = _GamePrize;
factory GamePrize.empty() => GamePrize(
id: '',
gameId: '',
name: '',
weight: 0,
stock: 0,
maxStock: 0,
threshold: 0,
metadata: const {},
game: Game.empty(),
createdAt: '',
updatedAt: '',
);
}