quickfix relapse model

main
Kai Mannweiler 2023-02-27 15:19:03 +01:00
parent 01d62a291c
commit 7a402e464c
1 changed files with 2 additions and 1 deletions

View File

@ -10,7 +10,7 @@ class Relapse implements DatabaseRecord {
@override
factory Relapse.fromDatabase(Map<String, dynamic> map) {
DateTime date = DateTime.parse(map['date']);
return Relapse(map['_category'], map['comment'], date);
return Relapse(map['category'], map['comment'], date);
}
@override
@ -21,6 +21,7 @@ class Relapse implements DatabaseRecord {
@override
Map<String, dynamic> toMap() {
return {
'category': _category,
'comment': _comment,
'date': _date.toIso8601String(),
};