cpd_2022_zi/lib/models/sleep.dart

19 lines
540 B
Dart

import 'package:flutter/material.dart';
import 'package:smoke_cess_app/interface/db_record.dart';
class Sleep implements DatabaseRecord {
final double _sleepQualityValue;
final String _comment;
final DateTime _date;
final TimeOfDay _sleepedAt;
final TimeOfDay _wokeUpAt;
Sleep(this._sleepQualityValue, this._comment, this._date, this._sleepedAt,
this._wokeUpAt);
@override
String toCSV() {
return "${_date.toIso8601String()}, ${_sleepQualityValue.round().toString()}, $_sleepedAt, $_wokeUpAt, $_comment";
}
}