new project stable version
This commit is contained in:
27
lib/domain/usecase/book_scooter_usecase.dart
Normal file
27
lib/domain/usecase/book_scooter_usecase.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:be_happy/core/result.dart';
|
||||
import 'package:be_happy/domain/entities/scooter_order.dart';
|
||||
import '../repositories/scooter_repository.dart';
|
||||
|
||||
class BookScooterUsecase {
|
||||
final ScooterRepository repository;
|
||||
|
||||
BookScooterUsecase(this.repository);
|
||||
|
||||
Future<Result<ScooterOrder>> call({
|
||||
required int scooterId,
|
||||
required int planId,
|
||||
int? subscriptionId,
|
||||
int? cardId,
|
||||
required bool isBalance,
|
||||
required bool isInsurance,
|
||||
}) {
|
||||
return repository.bookScooter(
|
||||
scooterId: scooterId,
|
||||
planId: planId,
|
||||
subscriptionId: subscriptionId,
|
||||
cardId: cardId,
|
||||
isBalance: isBalance,
|
||||
isInsurance: isInsurance,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user