package com.dbnt.sims.ivsgtMgt.boardInvestigation.repository;

import com.dbnt.sims.ivsgtMgt.boardInvestigation.model.RelatedReports;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface RelatedReportsRepository extends JpaRepository<RelatedReports, Integer> {
    @Transactional
    @Modifying
    @Query("delete from RelatedReports r where r.relatedReportsKey in :idList")
    void deleteAllByIdInQuery(@Param("idList") List<Integer> deleteKeyList);
}
