Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
send_unloading_usecase.dart
Go to the documentation of this file.
1import 'package:dartz/dartz.dart';
2
3import '../../../../core/common/use_case/use_case.dart';
4import '../../../../core/error/failures.dart';
5import '../../data/models/unloading_request_model.dart';
6import '../entities/collection_voucher_entity.dart';
7import '../repositories/unloading_repository.dart';
8
10
12 final double firstWeight;
13 final int userId;
14 final List<CollectionVoucherEntity> collectionVouchers;
15
17 required this.warehouseResponsibleId,
18 required this.firstWeight,
19 required this.userId,
20 required this.collectionVouchers,
21 });
22}
23
24class SendUnloadingUsecase implements UseCase<bool, SendUnloadingParams> {
26
27 SendUnloadingUsecase({required this.repository});
28
29 @override
30 Future<Either<Failure, bool>> call(SendUnloadingParams params) async {
31 return await repository.sendUnloading(UnloadingRequestModel(
32 collectionVouchers: params.collectionVouchers,
33 firstWeight: params.firstWeight,
34 userId: params.userId,
35 warehouseResponsibleId: params.warehouseResponsibleId,
36 ));
37 }
38}
sealed class CheckInOutEvent extends Equatable userId
final List< CollectionVoucherEntity > collectionVouchers
SendUnloadingParams({ required this.warehouseResponsibleId, required this.firstWeight, required this.userId, required this.collectionVouchers, })
override Future< Either< Failure, List< VehicleEntity > > > call(GetAvailableVehiclesParams params) async
class GetCollectionContactListParams repository
SendUnloadingUsecase({required this.repository})