package cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository;

import cokr.xit.ens.modules.common.code.StatCd;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendMast;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.code.TryStatCd;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.LocalDateTime;
import java.util.List;

public interface IntgrnSendMastRepository extends JpaRepository<IntgrnSendMast, Long>, IntgrnSendMastRepositoryCustom {

    List<IntgrnSendMast> findAllByIntSendMastIdIn(List<Long> sendMastIds);

    List<IntgrnSendMast> findAllByStatCdIn(List<StatCd> statCds);
    List<IntgrnSendMast> findAllByStatCdInOrTryStatCdIn(List<StatCd> statCds, List<TryStatCd> tryStatCds);

    List<IntgrnSendMast> findAllByStatCdInAndCloseDtBefore(List<StatCd> statCds, LocalDateTime closeDt);
}
