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

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

import cn.com.qmth.stmms.biz.exam.model.ImportQuery;
import cn.com.qmth.stmms.common.enums.ImportType;

public interface ImportQueryDao extends PagingAndSortingRepository<ImportQuery, Integer>,
        JpaSpecificationExecutor<ImportQuery> {

    @Modifying
    void deleteByExamIdAndUserIdAndType(int examId, Integer userId, ImportType type);

    ImportQuery findByExamIdAndUserIdAndType(int examId, Integer userId, ImportType type);

}
