package cn.com.qmth.stmms.ms.core.repository;

import cn.com.qmth.stmms.ms.core.domain.MarkStage;
import cn.com.qmth.stmms.ms.core.domain.MarkSubject;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by zhengmin on 2016/9/24.
 */
public interface MarkSubjectRepo extends JpaRepository<MarkSubject,String> {

    /**
     * 根据workId查找所有科目
     * @param workId
     * @return
     */
    public List<MarkSubject> findAllByWorkId(Long workId);

    /**
     * 查找启用的科目
     * @param workId
     * @return
     */
    List<MarkSubject> findAllByWorkIdAndEnableTrue(Long workId);

    List<MarkSubject> findByWorkIdAndTestNotIn(Long workId, List<Integer> ints);

    List<MarkSubject> findAllByWorkIdAndStageNot(Long workId, MarkStage stage);

    List<MarkSubject> findAllByWorkIdAndStage(Long workId, MarkStage stage);
}
