glp-companion/lib/features/exercise/domain/repositories/exercise_repository.dart

20 lines
728 B
Dart

import '../entities/exercise_entry.dart';
/// Persistence contract for the resistance-training log.
///
/// Pure Dart (no framework imports). The current implementation is an
/// in-memory session store; a drift-backed repository (SQLCipher on native
/// platforms) will implement the same contract without touching the
/// presentation layer.
abstract class IExerciseRepository {
/// All logged entries, newest first, optionally restricted to the
/// half-open interval `[from, to)`.
Future<List<ExerciseEntry>> getEntries({DateTime? from, DateTime? to});
/// Inserts a new entry.
Future<void> saveEntry(ExerciseEntry entry);
/// Removes the entry with [id], if present.
Future<void> deleteEntry(String id);
}