Removed matchId from Score class
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 43s
Pull Request Pipeline / lint (pull_request) Successful in 49s

This commit is contained in:
2026-04-09 18:00:19 +02:00
parent 73533b8c4f
commit 520edd0ca6
3 changed files with 0 additions and 8 deletions

View File

@@ -49,7 +49,6 @@ class ScoreDao extends DatabaseAccessor<AppDatabase> with _$ScoreDaoMixin {
return Score( return Score(
playerId: result.playerId, playerId: result.playerId,
matchId: result.matchId,
roundNumber: result.roundNumber, roundNumber: result.roundNumber,
score: result.score, score: result.score,
change: result.change, change: result.change,
@@ -64,7 +63,6 @@ class ScoreDao extends DatabaseAccessor<AppDatabase> with _$ScoreDaoMixin {
.map( .map(
(row) => Score( (row) => Score(
playerId: row.playerId, playerId: row.playerId,
matchId: row.matchId,
roundNumber: row.roundNumber, roundNumber: row.roundNumber,
score: row.score, score: row.score,
change: row.change, change: row.change,
@@ -86,7 +84,6 @@ class ScoreDao extends DatabaseAccessor<AppDatabase> with _$ScoreDaoMixin {
.map( .map(
(row) => Score( (row) => Score(
playerId: row.playerId, playerId: row.playerId,
matchId: row.matchId,
roundNumber: row.roundNumber, roundNumber: row.roundNumber,
score: row.score, score: row.score,
change: row.change, change: row.change,

View File

@@ -1,13 +1,11 @@
class Score { class Score {
final String playerId; final String playerId;
final String matchId;
final int roundNumber; final int roundNumber;
int score = 0; int score = 0;
int change = 0; int change = 0;
Score({ Score({
required this.playerId, required this.playerId,
required this.matchId,
required this.roundNumber, required this.roundNumber,
required this.score, required this.score,
required this.change, required this.change,
@@ -15,14 +13,12 @@ class Score {
Score.fromJson(Map<String, dynamic> json) Score.fromJson(Map<String, dynamic> json)
: playerId = json['playerId'], : playerId = json['playerId'],
matchId = json['matchId'],
roundNumber = json['roundNumber'], roundNumber = json['roundNumber'],
score = json['score'], score = json['score'],
change = json['change']; change = json['change'];
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
'playerId': playerId, 'playerId': playerId,
'matchId': matchId,
'roundNumber': roundNumber, 'roundNumber': roundNumber,
'score': score, 'score': score,
'change': change, 'change': change,

View File

@@ -84,7 +84,6 @@ void main() {
expect(score, isNotNull); expect(score, isNotNull);
expect(score!.playerId, testPlayer1.id); expect(score!.playerId, testPlayer1.id);
expect(score.matchId, testMatch1.id);
expect(score.roundNumber, 1); expect(score.roundNumber, 1);
expect(score.score, 10); expect(score.score, 10);
expect(score.change, 10); expect(score.change, 10);