product repo
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
part of '../product.dart';
|
||||
|
||||
abstract class IProductRepository {
|
||||
Future<Either<ProductFailure, ListProduct>> getProducts({
|
||||
int page = 1,
|
||||
int limit = 10,
|
||||
String? categoryId,
|
||||
String? search,
|
||||
bool forceRefresh = false,
|
||||
});
|
||||
|
||||
Future<Either<ProductFailure, List<Product>>> searchProductsOptimized(
|
||||
String query,
|
||||
);
|
||||
|
||||
Future<Either<ProductFailure, String>> syncAllProducts();
|
||||
|
||||
Future<Either<ProductFailure, ListProduct>> refreshProducts({
|
||||
String? categoryId,
|
||||
String? search,
|
||||
});
|
||||
|
||||
Future<Either<ProductFailure, Product>> getProductById(String id);
|
||||
|
||||
Future<bool> hasLocalProducts();
|
||||
|
||||
Future<Either<ProductFailure, Map<String, dynamic>>> getDatabaseStats();
|
||||
|
||||
void clearCache();
|
||||
|
||||
Future<bool> isLocalDatabaseReady();
|
||||
|
||||
Future<void> clearAllProducts();
|
||||
}
|
||||
Reference in New Issue
Block a user