package io.gmss.fiscad.repositories.metadata;

import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
import io.gmss.fiscad.entities.metadata.MobileDataCaracteristiqueUniteLogement;
import io.gmss.fiscad.entities.metadata.MobileDataEnqueteBatiment;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface MobileDataEnqueteBatimentRepository extends JpaRepository<MobileDataEnqueteBatiment, Long> {
    //Optional<MobileDataEnqueteBatiment> findByEnqueteBatimentPayload_TerminalIdAndEnqueteBatimentPayload_ExternalKey(Long terminalId,Long externalKey);
    Optional<MobileDataEnqueteBatiment> findFirstByTerminalIdAndEnqueteExternalKey(Long terminalId,Long ExternalKey);

    List<MobileDataEnqueteBatiment> findAllByTraiterIsFalseAndTerminalId(Long TerminalId);
}
