package cn.com.qmth.stmms.biz.subjectheader.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import cn.com.qmth.stmms.biz.subjectheader.model.ArbitrationLibrary;
import cn.com.qmth.stmms.common.enums.LibraryStatus;
import cn.com.qmth.stmms.common.enums.LibraryType;

public interface ArbitrationLibraryDao extends PagingAndSortingRepository<ArbitrationLibrary, Integer>,
        JpaSpecificationExecutor<ArbitrationLibrary> {

    List<ArbitrationLibrary> findByExamIdAndSubjectCodeAndTypeAndStatus(Integer examId, String subjectCode, LibraryType type, LibraryStatus status);

    List<ArbitrationLibrary> findByExamIdAndBlockIdAndTypeAndStatus(Integer examId,
            Integer subjectiveBlockId, LibraryType formally, LibraryStatus waiting);

}
