Updated folder structure
This commit is contained in:
@@ -2,7 +2,8 @@ import 'package:cabo_counter/data/db/tables/game_session_table.dart';
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
class PlayersTable extends Table {
|
||||
TextColumn get id =>
|
||||
TextColumn get playerId =>
|
||||
text().references(GameSessionTable, #id, onDelete: KeyAction.cascade)();
|
||||
IntColumn get position => integer()();
|
||||
TextColumn get name => text()();
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@ 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 roundId => 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};
|
||||
Set<Column<Object>> get primaryKey => {roundId};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user