Line data Source code
1 : import 'package:app_pym/core/usecases/usecase.dart';
2 : import 'package:app_pym/domain/entities/app_pym/booking.dart';
3 : import 'package:app_pym/domain/repositories/app_pym/booking_repository.dart';
4 : import 'package:injectable/injectable.dart';
5 :
6 : @prod
7 : @lazySingleton
8 : class FetchAllBookingsOfService extends Usecase<Future<List<Booking>>, int> {
9 : final BookingRepository repository;
10 :
11 0 : const FetchAllBookingsOfService(this.repository);
12 :
13 0 : @override
14 : Future<List<Booking>> call(int service_id) {
15 0 : return repository.fetchAllOf(service_id);
16 : }
17 : }
|