package com.xydl.cac.repository;

import com.xydl.cac.entity.NPoint;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface NPointRepository extends JpaRepository<NPoint, Integer>, JpaSpecificationExecutor<NPoint> {

    List<NPoint> findBySensorId(Integer sensorId);

    List<NPoint> findBySensorIdAndField(Integer sensorId, String field);

    List<NPoint> findBySensorIdAndType(Integer sensorId, Integer type);

    void deleteBySensorId(Integer sensorId);
}