import '../models/user_entity.dart'; import '../repositories/profil_repository.dart'; class CreatePassengerUseCase { final ProfilRepository profilRepository; CreatePassengerUseCase(this.profilRepository); Future call({ required String userId, required PassengerModel passenger, }) async { await profilRepository.createPassenger( userId: userId, passenger: passenger, ); } } class GetPassengerByIdUseCase { final ProfilRepository profilRepository; GetPassengerByIdUseCase(this.profilRepository); Future> call(String userId) async { return await profilRepository.getPassengerById(userId); } } class GetUserByIdUseCase { final ProfilRepository profilRepository; GetUserByIdUseCase(this.profilRepository); Future call(String userId) => profilRepository.getUserById(userId); }