package gc.mda.kcg.domain.fleet.repository;

import gc.mda.kcg.domain.fleet.ParentResolution;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface ParentResolutionRepository extends JpaRepository<ParentResolution, Long> {
    Optional<ParentResolution> findByGroupKeyAndSubClusterId(String groupKey, Integer subClusterId);
    List<ParentResolution> findByGroupKey(String groupKey);
    Page<ParentResolution> findByStatusOrderByUpdatedAtDesc(String status, Pageable pageable);
    Page<ParentResolution> findAllByOrderByUpdatedAtDesc(Pageable pageable);
}
