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

import at.procon.dip.domain.document.entity.DocumentMailMessage;
import at.procon.dip.ingestion.mail.MailProviderType;
import java.util.Optional;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;

public interface DocumentMailMessageRepository extends JpaRepository<DocumentMailMessage, UUID> {

    Optional<DocumentMailMessage> findByProviderTypeAndAccountKeyAndFolderKeyAndProviderMessageKey(
            MailProviderType providerType,
            String accountKey,
            String folderKey,
            String providerMessageKey
    );
}
