Added Getters for Models
parent
afd5e37ecf
commit
1566f5c92a
|
@ -8,6 +8,7 @@ class Mood implements DatabaseRecord {
|
|||
Mood(this._moodValue, this._comment, this._date);
|
||||
|
||||
DateTime get date => _date;
|
||||
int get moodValue => _moodValue;
|
||||
|
||||
@override
|
||||
factory Mood.fromDatabase(Map<String, dynamic> map) {
|
||||
|
|
|
@ -7,6 +7,9 @@ class Relapse implements DatabaseRecord {
|
|||
|
||||
Relapse(this._category, this._comment, this._date);
|
||||
|
||||
String get category => _category;
|
||||
DateTime get date => _date;
|
||||
|
||||
@override
|
||||
factory Relapse.fromDatabase(Map<String, dynamic> map) {
|
||||
DateTime date = DateTime.parse(map['date']);
|
||||
|
|
|
@ -12,6 +12,7 @@ class Sleep implements DatabaseRecord {
|
|||
this._wokeUpAt);
|
||||
|
||||
DateTime get date => _date;
|
||||
int get sleepQualitiyValue => _sleepQualityValue;
|
||||
|
||||
@override
|
||||
factory Sleep.fromDatabase(Map<String, dynamic> map) {
|
||||
|
|
|
@ -8,6 +8,8 @@ class Workout implements DatabaseRecord {
|
|||
Workout(this._motivationBefore, this._motivationAfter, this._workoutDate);
|
||||
|
||||
DateTime get date => _workoutDate;
|
||||
int get motivationBefore => _motivationBefore;
|
||||
int get motivationAfter => _motivationAfter;
|
||||
|
||||
@override
|
||||
factory Workout.fromDatabase(Map<String, dynamic> map) {
|
||||
|
|
Loading…
Reference in New Issue