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