Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/// Use case: Récupérer une contribution par son ID
|
||||
library get_contribution_by_id;
|
||||
|
||||
import 'package:injectable/injectable.dart';
|
||||
import '../../data/models/contribution_model.dart';
|
||||
import '../repositories/contribution_repository.dart';
|
||||
|
||||
/// Use case pour récupérer le détail d'une contribution
|
||||
@injectable
|
||||
class GetContributionById {
|
||||
final IContributionRepository _repository;
|
||||
|
||||
GetContributionById(this._repository);
|
||||
|
||||
/// Exécute le use case
|
||||
///
|
||||
/// [id] - UUID de la cotisation
|
||||
///
|
||||
/// Retourne le détail complet de la contribution
|
||||
/// Lève une exception si la contribution n'existe pas
|
||||
Future<ContributionModel> call(String id) async {
|
||||
return _repository.getCotisationById(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user