package com.hiveops.aria.repository;

import com.hiveops.aria.entity.PrecursorSequenceAlert;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface PrecursorSequenceAlertRepository extends JpaRepository<PrecursorSequenceAlert, Long> {

    Page<PrecursorSequenceAlert> findByResolvedAtIsNullOrderByTriggeredAtDesc(Pageable pageable);

    Page<PrecursorSequenceAlert> findByDeviceAgentIdOrderByTriggeredAtDesc(String deviceAgentId, Pageable pageable);

    Page<PrecursorSequenceAlert> findAllByOrderByTriggeredAtDesc(Pageable pageable);
}
