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