package io.gmss.fiscad.repositories.metadata;

import io.gmss.fiscad.entities.metadata.MobileDataActeurConcerne;
import io.gmss.fiscad.entities.metadata.MobileDataParcelle;
import io.gmss.fiscad.entities.metadata.MobileDataPersonne;
import io.gmss.fiscad.entities.metadata.MobileDataPiece;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface MobileDataPieceRepository extends JpaRepository<MobileDataPiece, Long> {
    //Optional<MobileDataPiece> findByPiecePayLoad_TerminalIdAndPiecePayLoad_ExternalKey(Long terminalId,Long externalKey);
    List<MobileDataPiece> findAllByTraiterIsFalseAndTerminalId(Long TerminalId);
    Optional<MobileDataPiece> findFirstByTerminalIdAndEnqueteExternalKey(Long terminalId, Long ExternalKey);

}
