- Task #6: WebSocket /ws/dashboard + Kafka events (5 topics) * Backend: KafkaEventProducer, KafkaEventConsumer * Mobile: WebSocketService (reconnection, heartbeat, typed events) * DashboardBloc: Auto-refresh depuis WebSocket events - Finance Workflow: approbations + budgets (backend + mobile) * Backend: entities, services, resources, migrations Flyway V6 * Mobile: features finance_workflow complète avec BLoC - Corrections DI: interfaces IRepository partout * IProfileRepository, IOrganizationRepository, IMembreRepository * GetIt configuré avec @injectable - Spec-Kit: constitution + templates mis à jour * .specify/memory/constitution.md enrichie * Templates agent, plan, spec, tasks, checklist - Nettoyage: fichiers temporaires supprimés Signed-off-by: lions dev Team
27 lines
759 B
Dart
27 lines
759 B
Dart
/// Use case: Annuler une inscription à un événement
|
|
library cancel_registration;
|
|
|
|
import 'package:injectable/injectable.dart';
|
|
import '../repositories/evenement_repository.dart';
|
|
|
|
/// Use case pour se désinscrire d'un événement
|
|
@injectable
|
|
class CancelRegistration {
|
|
final IEvenementRepository _repository;
|
|
|
|
CancelRegistration(this._repository);
|
|
|
|
/// Exécute le use case
|
|
///
|
|
/// [evenementId] - UUID de l'événement
|
|
///
|
|
/// Annule l'inscription du membre connecté à l'événement
|
|
/// Lève une exception si:
|
|
/// - L'événement n'existe pas
|
|
/// - Le membre n'est pas inscrit
|
|
/// - L'événement a déjà commencé
|
|
Future<void> call(String evenementId) async {
|
|
return _repository.desinscrireEvenement(evenementId);
|
|
}
|
|
}
|