Added Database, Tables & DAOs
This commit is contained in:
13
lib/data/db/tables/rounds_table.dart
Normal file
13
lib/data/db/tables/rounds_table.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:cabo_counter/data/db/tables/game_session_table.dart';
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class RoundsTable extends Table {
|
||||
TextColumn get id => text()();
|
||||
TextColumn get gameId =>
|
||||
text().references(GameSessionTable, #id, onDelete: KeyAction.cascade)();
|
||||
IntColumn get roundNumber => integer()();
|
||||
TextColumn get kamikazePlayer => text().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column<Object>> get primaryKey => {id};
|
||||
}
|
||||
Reference in New Issue
Block a user