package com.agent.management.repository;

import com.agent.management.model.entity.RagStructuredSchemaProfileEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

public interface RagStructuredSchemaProfileRepository extends JpaRepository<RagStructuredSchemaProfileEntity, Long> {
    Optional<RagStructuredSchemaProfileEntity> findByDataSourceIdAndCatalogNameAndSchemaName(
            Long dataSourceId, String catalogName, String schemaName);
    Optional<RagStructuredSchemaProfileEntity> findFirstByDataSourceIdOrderByScannedAtDesc(Long dataSourceId);
    void deleteByDataSourceId(Long dataSourceId);
}
