import 'package:smoke_cess_app/interface/db_record.dart'; class Workout implements DatabaseRecord { int _motivationBefore; int _motivationAfter; DateTime _workoutDate; Workout(this._motivationBefore, this._motivationAfter, this._workoutDate); @override factory Workout.fromMap(Map map) { return Workout(map['_workoutDuration'], map['_motivationBefore'], map['_motivationAfter']); } @override String toCSV() => "${_workoutDate.toIso8601String()}, $_motivationBefore, $_motivationAfter"; @override Map toMap() { return { 'motivationBefore': _motivationBefore, 'motivationAfter': _motivationAfter, 'workoutDate': _workoutDate, }; } }