quickfix relapse model
parent
01d62a291c
commit
7a402e464c
|
@ -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(),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue