From 520edd0ca63c728d0392374d1109835c4adb19bf Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Thu, 9 Apr 2026 18:00:19 +0200 Subject: [PATCH] Removed matchId from Score class --- lib/data/dao/score_dao.dart | 3 --- lib/data/models/score.dart | 4 ---- test/db_tests/values/score_test.dart | 1 - 3 files changed, 8 deletions(-) diff --git a/lib/data/dao/score_dao.dart b/lib/data/dao/score_dao.dart index feae146..6db9e8e 100644 --- a/lib/data/dao/score_dao.dart +++ b/lib/data/dao/score_dao.dart @@ -49,7 +49,6 @@ class ScoreDao extends DatabaseAccessor with _$ScoreDaoMixin { return Score( playerId: result.playerId, - matchId: result.matchId, roundNumber: result.roundNumber, score: result.score, change: result.change, @@ -64,7 +63,6 @@ class ScoreDao extends DatabaseAccessor with _$ScoreDaoMixin { .map( (row) => Score( playerId: row.playerId, - matchId: row.matchId, roundNumber: row.roundNumber, score: row.score, change: row.change, @@ -86,7 +84,6 @@ class ScoreDao extends DatabaseAccessor with _$ScoreDaoMixin { .map( (row) => Score( playerId: row.playerId, - matchId: row.matchId, roundNumber: row.roundNumber, score: row.score, change: row.change, diff --git a/lib/data/models/score.dart b/lib/data/models/score.dart index 20782b1..a8bc240 100644 --- a/lib/data/models/score.dart +++ b/lib/data/models/score.dart @@ -1,13 +1,11 @@ class Score { final String playerId; - final String matchId; final int roundNumber; int score = 0; int change = 0; Score({ required this.playerId, - required this.matchId, required this.roundNumber, required this.score, required this.change, @@ -15,14 +13,12 @@ class Score { Score.fromJson(Map json) : playerId = json['playerId'], - matchId = json['matchId'], roundNumber = json['roundNumber'], score = json['score'], change = json['change']; Map toJson() => { 'playerId': playerId, - 'matchId': matchId, 'roundNumber': roundNumber, 'score': score, 'change': change, diff --git a/test/db_tests/values/score_test.dart b/test/db_tests/values/score_test.dart index e54493a..9fd8afd 100644 --- a/test/db_tests/values/score_test.dart +++ b/test/db_tests/values/score_test.dart @@ -84,7 +84,6 @@ void main() { expect(score, isNotNull); expect(score!.playerId, testPlayer1.id); - expect(score.matchId, testMatch1.id); expect(score.roundNumber, 1); expect(score.score, 10); expect(score.change, 10);