package com.its.op.dao.repository.its.road;

import com.its.op.entity.its.road.TbRoadTraf;
import com.its.op.entity.its.road.TbRoadTrafSimple;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TbRoadTrafSimpleRepository extends JpaRepository<TbRoadTrafSimple, Long>, JpaSpecificationExecutor<TbRoadTraf> {

    @Query("select p from TbRoadTrafSimple p where p.prcnDt >= to_char(sysdate - 10/1440, 'YYYYMMDDHH24MISS')")
    List<TbRoadTrafSimple> findAll();
}
