package com.qmth.qrzk.dao.repositories;

import com.qmth.qrzk.repository.user.model.PaperAnalysis;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface PaperAnalysisRepo extends JpaRepository<PaperAnalysis, Integer>, JpaSpecificationExecutor<PaperAnalysis> {

    @Query("select b from PaperAnalysis b where b.paperBatch.id = ?1 and b.courseCode=?2")
    List<PaperAnalysis> findByBatchIdAndCourseCode(int id, String courseCode);
}
