Compare commits
4 Commits
e4ea46c6cd
...
f04d57382c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f04d57382c | ||
|
|
5094554475 | ||
|
|
866f79998c | ||
|
|
8e4cff19d1 |
@@ -6,7 +6,7 @@ class MatchTable extends Table {
|
|||||||
TextColumn get id => text()();
|
TextColumn get id => text()();
|
||||||
TextColumn get gameId =>
|
TextColumn get gameId =>
|
||||||
text().references(GameTable, #id, onDelete: KeyAction.cascade)();
|
text().references(GameTable, #id, onDelete: KeyAction.cascade)();
|
||||||
// Nullable if not part of a group
|
// Nullable if there is no group associated with the match
|
||||||
TextColumn get groupId =>
|
TextColumn get groupId =>
|
||||||
text().references(GroupTable, #id, onDelete: KeyAction.cascade).nullable()();
|
text().references(GroupTable, #id, onDelete: KeyAction.cascade).nullable()();
|
||||||
TextColumn get name => text().nullable()();
|
TextColumn get name => text().nullable()();
|
||||||
|
|||||||
@@ -16,11 +16,12 @@ class Game {
|
|||||||
DateTime? createdAt,
|
DateTime? createdAt,
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.ruleset,
|
required this.ruleset,
|
||||||
required this.description,
|
String? description,
|
||||||
required this.color,
|
required this.color,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
}) : id = id ?? const Uuid().v4(),
|
}) : id = id ?? const Uuid().v4(),
|
||||||
createdAt = createdAt ?? clock.now();
|
createdAt = createdAt ?? clock.now(),
|
||||||
|
description = description ?? '';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
|
|||||||
@@ -13,10 +13,11 @@ class Group {
|
|||||||
String? id,
|
String? id,
|
||||||
DateTime? createdAt,
|
DateTime? createdAt,
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.description,
|
String? description,
|
||||||
required this.members,
|
required this.members,
|
||||||
}) : id = id ?? const Uuid().v4(),
|
}) : id = id ?? const Uuid().v4(),
|
||||||
createdAt = createdAt ?? clock.now();
|
createdAt = createdAt ?? clock.now(),
|
||||||
|
description = description ?? '';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
|
|||||||
@@ -24,10 +24,11 @@ class Match {
|
|||||||
required this.game,
|
required this.game,
|
||||||
this.group,
|
this.group,
|
||||||
this.players = const [],
|
this.players = const [],
|
||||||
required this.notes,
|
String? notes,
|
||||||
this.winner,
|
this.winner,
|
||||||
}) : id = id ?? const Uuid().v4(),
|
}) : id = id ?? const Uuid().v4(),
|
||||||
createdAt = createdAt ?? clock.now();
|
createdAt = createdAt ?? clock.now(),
|
||||||
|
notes = notes ?? '';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
|
|||||||
Reference in New Issue
Block a user