package cn.com.qmth.examcloud.core.questions.dao;

import cn.com.qmth.examcloud.core.questions.dao.entity.AudioTimeConfig;
import cn.com.qmth.examcloud.core.questions.dao.entity.PaperDetailUnit;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.repository.query.QueryByExampleExecutor;

import java.util.List;

/**
 * @author chenken
 * @date 2017年8月10日 下午3:19:46
 * @company QMTH
 * @description AudioTimeConfigRepo.java
 */
public interface AudioTimeConfigRepo extends MongoRepository<AudioTimeConfig, String>, QueryByExampleExecutor<AudioTimeConfig> {

    /**
     * 根据examId删除设置
     *
     * @param examId
     */
    public void deleteByExamIdAndCourseCode(String examId, String courseCode);

    List<AudioTimeConfig> findByExamIdAndCourseCodeOrderByGroupCode(String examId, String courseCode);

    List<AudioTimeConfig> findByPaperDetailUnit(PaperDetailUnit paperDetailUnit);
    
    List<AudioTimeConfig> findByExamIdAndCourseCodeAndGroupCodeAndPaperDetailUnit(String examId, String courseCode,String groupCode,PaperDetailUnit paperDetailUnit);

}

