- Add Rooms, Tasks, TaskCompletions Drift tables with schema v2 migration - Create RoomsDao with CRUD, watchAll, watchWithStats, cascade delete, reorder - Create TasksDao with CRUD, watchInRoom (sorted by due), completeTask, overdue detection - Implement calculateNextDueDate and catchUpToPresent pure scheduling functions - Define IntervalType enum (8 types), EffortLevel enum, FrequencyInterval model - Add formatRelativeDate German formatter and curatedRoomIcons icon list - Enable PRAGMA foreign_keys in beforeOpen migration strategy - All 30 unit tests passing (17 scheduling + 6 rooms DAO + 7 tasks DAO) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
508 B
Dart
24 lines
508 B
Dart
/// Effort level for tasks.
|
|
///
|
|
/// IMPORTANT: Never reorder or remove values - intEnum stores the .index.
|
|
/// Always add new values at the END.
|
|
enum EffortLevel {
|
|
low, // 0
|
|
medium, // 1
|
|
high, // 2
|
|
}
|
|
|
|
/// German display labels for effort levels.
|
|
extension EffortLevelLabel on EffortLevel {
|
|
String label() {
|
|
switch (this) {
|
|
case EffortLevel.low:
|
|
return 'Gering';
|
|
case EffortLevel.medium:
|
|
return 'Mittel';
|
|
case EffortLevel.high:
|
|
return 'Hoch';
|
|
}
|
|
}
|
|
}
|