aaa
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import 'package:dartz/dartz.dart';
|
||||
import '../../../../core/errors/failures.dart';
|
||||
import '../entities/product_stage_entity.dart';
|
||||
import '../repositories/products_repository.dart';
|
||||
|
||||
/// Use case for getting product stages
|
||||
/// Encapsulates the business logic for fetching product stage information
|
||||
class GetProductDetailUseCase {
|
||||
final ProductsRepository repository;
|
||||
|
||||
GetProductDetailUseCase(this.repository);
|
||||
|
||||
/// Execute the use case
|
||||
///
|
||||
/// [warehouseId] - The ID of the warehouse
|
||||
/// [productId] - The ID of the product
|
||||
///
|
||||
/// Returns Either<Failure, List<ProductStageEntity>>
|
||||
Future<Either<Failure, List<ProductStageEntity>>> call(
|
||||
int warehouseId,
|
||||
int productId,
|
||||
) async {
|
||||
return await repository.getProductDetail(warehouseId, productId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user