package cn.palmte.work.model;

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

import java.util.List;

public interface ProjectInstanceRelationRepository extends JpaRepository<ProjectInstanceRelation,Integer> {
    /**
     * 根据项目id和类型找到流程实例id
     */
    List<ProjectInstanceRelation> findAllByProjectIdEqualsAndProcessTypeEqualsOrderByCreateTimeDesc(int projectId, String processType);

    List<ProjectInstanceRelation> findByProjectIdOrderByCreateTimeDesc(int projectId);
}
