Game Prize and Logout
This commit is contained in:
@@ -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: '',
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user