Added Database, Tables & DAOs

This commit is contained in:
2025-06-27 21:06:43 +02:00
parent 9d67e2f755
commit 3e647d70f3
18 changed files with 3468 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
import 'package:cabo_counter/data/db/tables/game_session_table.dart';
import 'package:cabo_counter/data/db/tables/players_table.dart';
import 'package:drift/drift.dart';
class PlayerScoresTable extends Table {
TextColumn get roundId =>
text().references(GameSessionTable, #id, onDelete: KeyAction.cascade)();
TextColumn get playerName => text().references(PlayersTable, #name)();
IntColumn get totalScore => integer()();
@override
Set<Column<Object>> get primaryKey => {roundId, playerName};
}