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

import at.procon.dip.domain.document.ContentRole;
import at.procon.dip.domain.document.entity.DocumentContent;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;

public interface DocumentContentRepository extends JpaRepository<DocumentContent, UUID> {

    List<DocumentContent> findByDocument_Id(UUID documentId);

    List<DocumentContent> findByDocument_IdAndContentRole(UUID documentId, ContentRole contentRole);

    Optional<DocumentContent> findByContentHash(String contentHash);
}
