Adjusted attributes to table definition

This commit is contained in:
2025-11-19 00:23:28 +01:00
parent f6ebda7984
commit 5dcd0826bd
4 changed files with 4 additions and 11 deletions

View File

@@ -57,7 +57,7 @@ class GameDao extends DatabaseAccessor<AppDatabase> with _$GameDaoMixin {
GameTableCompanion.insert(
id: game.id,
name: game.name,
winnerId: game.winner,
winnerId: Value(game.winner),
),
mode: InsertMode.insertOrReplace,
);

View File

@@ -4,6 +4,5 @@ part of 'game_dao.dart';
// ignore_for_file: type=lint
mixin _$GameDaoMixin on DatabaseAccessor<AppDatabase> {
$PlayerTableTable get playerTable => attachedDatabase.playerTable;
$GameTableTable get gameTable => attachedDatabase.gameTable;
}

View File

@@ -5,7 +5,6 @@ part of 'group_game_dao.dart';
// ignore_for_file: type=lint
mixin _$GroupGameDaoMixin on DatabaseAccessor<AppDatabase> {
$GroupTableTable get groupTable => attachedDatabase.groupTable;
$PlayerTableTable get playerTable => attachedDatabase.playerTable;
$GameTableTable get gameTable => attachedDatabase.gameTable;
$GroupGameTableTable get groupGameTable => attachedDatabase.groupGameTable;
}

View File

@@ -7,15 +7,10 @@ class Game {
final String name;
final List<Player>? players;
final Group? group;
final String winner;
final String? winner;
Game({
String? id,
required this.name,
this.players,
this.group,
this.winner = '',
}) : id = id ?? const Uuid().v4();
Game({String? id, required this.name, this.players, this.group, this.winner})
: id = id ?? const Uuid().v4();
@override
String toString() {