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

import cokr.xit.ens.modules.common.code.PostSeCd;
import cokr.xit.ens.modules.common.code.StatCd;
import cokr.xit.ens.modules.common.domain.SendMast;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface SendMastRepository extends JpaRepository<SendMast, Long>, SendMastRepositoryCustom{

    List<SendMast> findAllBySendMastIdIn(List<Long> sendMastIds);

    List<SendMast> findAllByPostSeAndStatCdIn(PostSeCd postSeCd, List<StatCd> statCds);

    List<SendMast> findAllByPostSeAndStatCdInAndSendDtBefore(PostSeCd postSeCd, List<StatCd> statCds, LocalDateTime sendDt);

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


}
