added createdAt timestamp to Group, Game, and Player DTOs

This commit is contained in:
2025-11-18 23:21:46 +01:00
parent 0202d09812
commit 67c8a7e181
3 changed files with 16 additions and 4 deletions

View File

@@ -5,9 +5,15 @@ class Group {
final String id;
final String name;
final List<Player> members;
final DateTime createdAt;
Group({String? id, required this.name, required this.members})
: id = id ?? const Uuid().v4();
Group({
String? id,
DateTime? createdAt,
required this.name,
required this.members,
}) : id = id ?? const Uuid().v4(),
createdAt = createdAt ?? DateTime.now();
@override
String toString() {