import 'package:dartz/dartz.dart';
import '../../core/errors/failures.dart';
import '../../models/equipment_unified_model.dart';

/// 장비 관리 Repository 인터페이스
abstract class EquipmentRepository {
  /// 장비 입고 목록 조회
  Future<Either<Failure, List<EquipmentIn>>> getEquipmentIns({
    int? page,
    int? limit,
    String? search,
    String? sortBy,
    String? sortOrder,
  });

  /// 장비 입고 상세 조회
  Future<Either<Failure, EquipmentIn>> getEquipmentInById(int id);

  /// 장비 입고 생성
  Future<Either<Failure, EquipmentIn>> createEquipmentIn(EquipmentIn equipmentIn);

  /// 장비 입고 수정
  Future<Either<Failure, EquipmentIn>> updateEquipmentIn(int id, EquipmentIn equipmentIn);

  /// 장비 입고 삭제
  Future<Either<Failure, void>> deleteEquipmentIn(int id);

  /// 장비 출고 목록 조회
  Future<Either<Failure, List<EquipmentOut>>> getEquipmentOuts({
    int? page,
    int? limit,
    String? search,
    String? sortBy,
    String? sortOrder,
  });

  /// 장비 출고 상세 조회
  Future<Either<Failure, EquipmentOut>> getEquipmentOutById(int id);

  /// 장비 출고 생성
  Future<Either<Failure, EquipmentOut>> createEquipmentOut(EquipmentOut equipmentOut);

  /// 장비 출고 수정
  Future<Either<Failure, EquipmentOut>> updateEquipmentOut(int id, EquipmentOut equipmentOut);

  /// 장비 출고 삭제
  Future<Either<Failure, void>> deleteEquipmentOut(int id);

  /// 장비 일괄 출고
  Future<Either<Failure, List<EquipmentOut>>> createBatchEquipmentOut(List<EquipmentOut> equipmentOuts);

  /// 제조사 목록 조회
  Future<Either<Failure, List<String>>> getManufacturers();

  /// 장비명 목록 조회
  Future<Either<Failure, List<String>>> getEquipmentNames();

  /// 장비 이력 조회
  Future<Either<Failure, List<dynamic>>> getEquipmentHistory(int equipmentId);

  /// 장비 검색
  Future<Either<Failure, List<Equipment>>> searchEquipment({
    String? manufacturer,
    String? name,
    String? category,
    String? serialNumber,
  });
}