package io.gmss.fiscad.repositories.metadata;

import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
import io.gmss.fiscad.entities.metadata.MobileDataEnquete;
import io.gmss.fiscad.entities.metadata.MobileDataEnqueteUniteLogement;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface MobileDataEnqueteUniteLogementRepository extends JpaRepository<MobileDataEnqueteUniteLogement, Long> {
   // Optional<MobileDataEnqueteUniteLogement> findByEnqueteUniteLogementPayload_TerminalIdAndEnqueteUniteLogementPayload_ExternalKey(Long terminalId,Long externalKey);
    Optional<MobileDataEnqueteUniteLogement> findFirstByTerminalIdAndEnqueteExternalKey(Long terminalId,Long ExternalKey);

    List<MobileDataEnqueteUniteLogement> findAllByTraiterIsFalseAndTerminalId(Long TerminalId);
}
