package cn.palmte.work.model;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author Yuanping Zhang
 * @date 2022/12/22
 */
public interface ProjectSettleMonthRangeRepository extends JpaRepository<ProjectSettleMonthRange, Integer> {

    @Query(value = "select * from project_settle_month_range where project_id = ?1 and end_date = ?2 limit 1", nativeQuery = true)
    ProjectSettleMonthRange findAllByProjectIdAndEndDate(int id, String endDate);
}
