2025-09-18 10:39:54 +07:00
|
|
|
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,
|
2025-09-18 14:53:39 +07:00
|
|
|
required List<GamePrize> prizes,
|
2025-09-18 10:39:54 +07:00
|
|
|
required String createdAt,
|
|
|
|
|
required String updatedAt,
|
|
|
|
|
}) = _Game;
|
|
|
|
|
|
|
|
|
|
factory Game.empty() => const Game(
|
|
|
|
|
id: '',
|
|
|
|
|
name: '',
|
|
|
|
|
type: '',
|
|
|
|
|
isActive: false,
|
|
|
|
|
metadata: {},
|
2025-09-18 14:53:39 +07:00
|
|
|
prizes: [],
|
2025-09-18 10:39:54 +07:00
|
|
|
createdAt: '',
|
|
|
|
|
updatedAt: '',
|
|
|
|
|
);
|
|
|
|
|
}
|