package common.repository;

import common.model.ChangeDelInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ChangeDelInfoRepository  extends JpaRepository<ChangeDelInfo, Long> {

    @Query(value = "select * from change_del_info where contract_code = ?1 order by ds desc",nativeQuery = true)
    List<ChangeDelInfo> findByContract(String contranctCode);

    @Query(value = "select * from change_del_info where ds >= ?1  and ds <= ?2 order by ds desc",nativeQuery = true)
    List<ChangeDelInfo> findOnStartDate(String startDate, String endDate);
}
