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

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

public interface DocumentMailAttachmentRepository extends JpaRepository<DocumentMailAttachment, UUID> {

    List<DocumentMailAttachment> findByMailDocumentId(UUID mailDocumentId);

    Optional<DocumentMailAttachment> findByMailDocumentIdAndAttachmentIndex(UUID mailDocumentId, Integer attachmentIndex);

    Optional<DocumentMailAttachment> findByMailDocumentIdAndPartPath(UUID mailDocumentId, String partPath);
}
