import 'package:dartz/dartz.dart'; import '../../../../core/errors/failures.dart'; import '../entities/scan_entity.dart'; /// Abstract repository interface for scanner operations /// This defines the contract that the data layer must implement abstract class ScannerRepository { /// Save scan data to remote server Future> saveScan({ required String barcode, required String field1, required String field2, required String field3, required String field4, }); /// Get scan history from local storage Future>> getScanHistory(); /// Save scan to local storage Future> saveScanLocally(ScanEntity scan); /// Delete a scan from local storage Future> deleteScanLocally(String barcode); /// Clear all scan history from local storage Future> clearScanHistory(); /// Get a specific scan by barcode from local storage Future> getScanByBarcode(String barcode); /// Update a scan in local storage Future> updateScanLocally(ScanEntity scan); }