package com.agent.management.repository; import com.agent.management.model.entity.RagKnowledgeSourceBinding; import com.agent.management.rag.model.RagSourceType; import org.springframework.data.jpa.repository.JpaRepository; import java.util.*;
public interface RagKnowledgeSourceBindingRepository extends JpaRepository<RagKnowledgeSourceBinding,Long>{List<RagKnowledgeSourceBinding> findByKnowledgeBaseIdAndEnabledTrueOrderByPriorityAsc(Long knowledgeBaseId);List<RagKnowledgeSourceBinding> findByKnowledgeBaseIdOrderByPriorityAsc(Long knowledgeBaseId);Optional<RagKnowledgeSourceBinding> findByKnowledgeBaseIdAndSourceTypeAndSourceId(Long knowledgeBaseId,RagSourceType sourceType,String sourceId);}
