tdd 진행
This commit is contained in:
@@ -7,6 +7,7 @@ class Score {
|
||||
final int totalScore;
|
||||
final DateTime date;
|
||||
final String? notes;
|
||||
final String? participantName;
|
||||
|
||||
Score({
|
||||
required this.id,
|
||||
@@ -17,6 +18,7 @@ class Score {
|
||||
required this.totalScore,
|
||||
required this.date,
|
||||
this.notes,
|
||||
this.participantName,
|
||||
});
|
||||
|
||||
factory Score.fromJson(Map<String, dynamic> json) {
|
||||
@@ -29,6 +31,7 @@ class Score {
|
||||
totalScore: json['totalScore'] ?? 0,
|
||||
date: json['date'] != null ? DateTime.parse(json['date'].toString()) : DateTime.now(),
|
||||
notes: json['notes']?.toString(),
|
||||
participantName: json['participantName']?.toString(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -42,6 +45,7 @@ class Score {
|
||||
'totalScore': totalScore,
|
||||
'date': date.toIso8601String(),
|
||||
'notes': notes,
|
||||
'participantName': participantName,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user