package com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository;

import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.processResult.ProcessResultVersion;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface ProcessResultVersionRepository extends JpaRepository<ProcessResultVersion, ProcessResultVersion.ProcessResultVersionId> {
    Optional<ProcessResultVersion> findTopByPrKeyOrderByVersionNoDesc(Integer prKey);
    List<ProcessResultVersion> findByPrKey(Integer prKey);

    ProcessResultVersion findByVersionNoAndPrKey(Integer versionNo, Integer prKey);
}
