Commit 27cf322

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-03-25 22:32:34
document db manager scheme
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 73786a4
Changed files (1)
health_data_store
health_data_store/lib/src/database_manager.dart
@@ -5,6 +5,21 @@ import 'package:sqflite_common/sqlite_api.dart';
 /// 
 /// Responsible for setting up the database and performing schema and version 
 /// updates.
+///
+/// ## DB scheme
+///
+/// ![Diagram](https://github.com/NobodyForNothing/blood-pressure-monitor-fl/assets/82763757/62edb58c-c579-4ce1-990c-be7889657fa7)
+///
+/// ## Types
+/// Data in the database tries to always use the most common SI-units.
+/// Exceptions must be documented here.
+/// - Timestamps are in seconds since unix epoch
+/// - Color are integers in format 0xRRGGBB
+/// - Pressure is in *kPa* // TODO: rethink and validate this is used everywhere; possibly encapsulate values in type class
+/// - Pulse is in bpm
+/// - Weight is in kg
+/// - Length is in meter
+/// - Temperature is in kelvin
 class DatabaseManager {
   DatabaseManager._create(this._db);