Adjusted attributes to table definition
This commit is contained in:
@@ -57,7 +57,7 @@ class GameDao extends DatabaseAccessor<AppDatabase> with _$GameDaoMixin {
|
|||||||
GameTableCompanion.insert(
|
GameTableCompanion.insert(
|
||||||
id: game.id,
|
id: game.id,
|
||||||
name: game.name,
|
name: game.name,
|
||||||
winnerId: game.winner,
|
winnerId: Value(game.winner),
|
||||||
),
|
),
|
||||||
mode: InsertMode.insertOrReplace,
|
mode: InsertMode.insertOrReplace,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,6 +4,5 @@ part of 'game_dao.dart';
|
|||||||
|
|
||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
mixin _$GameDaoMixin on DatabaseAccessor<AppDatabase> {
|
mixin _$GameDaoMixin on DatabaseAccessor<AppDatabase> {
|
||||||
$PlayerTableTable get playerTable => attachedDatabase.playerTable;
|
|
||||||
$GameTableTable get gameTable => attachedDatabase.gameTable;
|
$GameTableTable get gameTable => attachedDatabase.gameTable;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ part of 'group_game_dao.dart';
|
|||||||
// ignore_for_file: type=lint
|
// ignore_for_file: type=lint
|
||||||
mixin _$GroupGameDaoMixin on DatabaseAccessor<AppDatabase> {
|
mixin _$GroupGameDaoMixin on DatabaseAccessor<AppDatabase> {
|
||||||
$GroupTableTable get groupTable => attachedDatabase.groupTable;
|
$GroupTableTable get groupTable => attachedDatabase.groupTable;
|
||||||
$PlayerTableTable get playerTable => attachedDatabase.playerTable;
|
|
||||||
$GameTableTable get gameTable => attachedDatabase.gameTable;
|
$GameTableTable get gameTable => attachedDatabase.gameTable;
|
||||||
$GroupGameTableTable get groupGameTable => attachedDatabase.groupGameTable;
|
$GroupGameTableTable get groupGameTable => attachedDatabase.groupGameTable;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,15 +7,10 @@ class Game {
|
|||||||
final String name;
|
final String name;
|
||||||
final List<Player>? players;
|
final List<Player>? players;
|
||||||
final Group? group;
|
final Group? group;
|
||||||
final String winner;
|
final String? winner;
|
||||||
|
|
||||||
Game({
|
Game({String? id, required this.name, this.players, this.group, this.winner})
|
||||||
String? id,
|
: id = id ?? const Uuid().v4();
|
||||||
required this.name,
|
|
||||||
this.players,
|
|
||||||
this.group,
|
|
||||||
this.winner = '',
|
|
||||||
}) : id = id ?? const Uuid().v4();
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
|
|||||||
Reference in New Issue
Block a user