package research.loghunter.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import research.loghunter.entity.ScanHistory;
import java.util.List;
import java.util.Optional;

public interface ScanHistoryRepository extends JpaRepository<ScanHistory, Long> {
    List<ScanHistory> findByServerIdOrderByStartedAtDesc(Long serverId);
    Optional<ScanHistory> findTopByServerIdOrderByStartedAtDesc(Long serverId);
}
