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

import com.its.op.entity.its.link.TbLinkTraf;
import com.its.op.entity.its.link.TbLinkTrafSimple;
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 TbLinkTrafSimpleRepository extends JpaRepository<TbLinkTrafSimple, Long>, JpaSpecificationExecutor<TbLinkTraf> {

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