import 'package:dartz/dartz.dart';
import '../../core/errors/failures.dart';
import '../../data/models/equipment/equipment_dto.dart';
import '../../data/models/common/paginated_response.dart';

/// 장비 관리 Repository 인터페이스
abstract class EquipmentRepository {
  /// 장비 목록 조회 (페이지네이션 지원)
  Future<Either<Failure, PaginatedResponse<EquipmentDto>>> getEquipments({
    int? page,
    int? limit,
    String? search,
  });

  /// 장비 상세 조회
  Future<Either<Failure, EquipmentDto>> getEquipmentDetail(int id);

  /// 장비 생성
  Future<Either<Failure, EquipmentDto>> createEquipment(EquipmentRequestDto request);

  /// 장비 수정
  Future<Either<Failure, EquipmentDto>> updateEquipment(int id, EquipmentUpdateRequestDto request);

  /// 장비 삭제 (소프트 삭제)
  Future<Either<Failure, void>> deleteEquipment(int id);

  /// 장비 복구 (Soft Delete 복원)
  Future<Either<Failure, EquipmentDto>> restoreEquipment(int id);

  /// 시리얼 번호로 장비 검색
  Future<Either<Failure, EquipmentDto>> getEquipmentBySerial(String serial);

  /// 바코드로 장비 검색  
  Future<Either<Failure, EquipmentDto>> getEquipmentByBarcode(String barcode);

  /// 회사별 장비 목록 조회
  Future<Either<Failure, List<EquipmentDto>>> getEquipmentsByCompany(int companyId);
}