package cn.palmte.work.model;

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

import java.util.List;

public interface ProjectBudgetCostProjectManageDetailRepository extends JpaRepository<ProjectBudgetCostProjectManageDetail,Integer> {
    List<ProjectBudgetCostProjectManageDetail> findAllByProjectIdEquals(int id);

    @Query(value = "select sum(amount) from project_budget_cost_project_manage_detail where project_id = ?1", nativeQuery = true)
    Integer findAmountByProject(int id);
}
