package ai.decompile.analysis.model.repository;

import ai.decompile.analysis.model.entity.StaticAnalysis;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
import org.springframework.data.jpa.repository.JpaRepository;

public interface StaticAnalysisRepository extends JpaRepository<StaticAnalysis, UUID> {
  List<StaticAnalysis> findByBinaryIdOrderByCreatedAtDesc(UUID binaryId);

  Optional<StaticAnalysis> findFirstByBinaryIdOrderByCreatedAtDesc(UUID binaryId);

  Optional<StaticAnalysis> findByBinaryIdAndEngine(UUID binaryId, String engine);
}
