package io.gmss.fiscad.repositories.metadata;

import io.gmss.fiscad.entities.metadata.MobileDataBatiment;
import io.gmss.fiscad.entities.metadata.MobileDataCaracteristiqueBatiment;
import io.gmss.fiscad.entities.metadata.MobileDataUpload;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface MobileDataCaracteristiqueBatimentRepository extends JpaRepository<MobileDataCaracteristiqueBatiment, Long> {
    //Optional<MobileDataCaracteristiqueBatiment> findByCaracteristiqueBatimentPaylod_TerminalIdAndCaracteristiqueBatimentPaylod_ExternalKey(Long terminalId,Long externalKey);
    Optional<MobileDataCaracteristiqueBatiment> findFirstByTerminalIdAndEnqueteExternalKey(Long terminalId,Long ExternalKey);

    List<MobileDataCaracteristiqueBatiment> findAllByTraiterIsFalseAndTerminalId(Long TerminalId);
}
