feat(sync): préparation à la synchronisation cloud (ticket #12)
Ajuste les ports et le bootstrap applicatif, ainsi que le mapping Drift des repositories, pour préparer une future synchronisation cloud (invariants documentés dans docs/sync-invariants.md). Corrige au passage un bug de fuseau horaire UTC dans le mapping Drift. flutter analyze propre, 35/35 tests verts, build APK debug validé. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -92,3 +92,26 @@ abstract interface class WorkoutHistoryRepository {
|
||||
Future<void> saveSetResult(WorkoutHistorySetResult result);
|
||||
Future<void> delete(String id, DateTime deletedAt);
|
||||
}
|
||||
|
||||
final class SyncRunSummary {
|
||||
const SyncRunSummary({
|
||||
required this.pushedChanges,
|
||||
required this.pulledChanges,
|
||||
});
|
||||
|
||||
final int pushedChanges;
|
||||
final int pulledChanges;
|
||||
}
|
||||
|
||||
abstract interface class SyncGateway {
|
||||
Future<SyncRunSummary> synchronize();
|
||||
}
|
||||
|
||||
final class NoOpSyncGateway implements SyncGateway {
|
||||
const NoOpSyncGateway();
|
||||
|
||||
@override
|
||||
Future<SyncRunSummary> synchronize() async {
|
||||
return const SyncRunSummary(pushedChanges: 0, pulledChanges: 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user