package at.procon.dip.domain.ted.repository;

import at.procon.dip.domain.ted.entity.TedNoticeProjection;
import java.util.Optional;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;

public interface TedNoticeProjectionRepository extends JpaRepository<TedNoticeProjection, UUID> {

    Optional<TedNoticeProjection> findByDocument_Id(UUID documentId);

   Optional<TedNoticeProjection> findByLegacyProcurementDocumentId(UUID legacyProcurementDocumentId);

    Optional<TedNoticeProjection> findByPackageIdentifierAndPublicationId(String packageIdentifier, String publicationId);

    boolean existsByLegacyProcurementDocumentId(UUID legacyProcurementDocumentId);
}
