feat(02-01): Drift tables, DAOs, scheduling utility, domain models with tests
- 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>
This commit is contained in:
23
lib/features/tasks/domain/effort_level.dart
Normal file
23
lib/features/tasks/domain/effort_level.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
/// 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';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user