package io.gmss.fiscad.repositories.metadata;

import io.gmss.fiscad.entities.metadata.MobileDataEnquete;
import io.gmss.fiscad.entities.metadata.MobileDataEnqueteBatiment;
import io.gmss.fiscad.entities.metadata.MobileDataUpload;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface MobileDataEnqueteRepository extends JpaRepository<MobileDataEnquete, Long> {
    //Optional<MobileDataEnquete> findByEnquetePayLoad_TerminalIdAndEnquetePayLoad_ExternalKey(Long terminalId,Long externalKey);
    Optional<MobileDataEnquete> findFirstByTerminalIdAndEnqueteExternalKey(Long terminalId,Long ExternalKey);

    List<MobileDataEnquete> findAllByTraiterIsFalseAndTerminalId(Long TerminalId);
}
