package com.its.api.its.repository.link;

import com.its.api.its.model.entity.link.TbLinkVrtxArr;
import com.its.api.its.model.entity.link.TbLinkVrtxArrKey;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TbLinkVrtxArrRepository extends JpaRepository<TbLinkVrtxArr, TbLinkVrtxArrKey>, JpaSpecificationExecutor<TbLinkVrtxArr> {

    @Query("select p from TbLinkVrtxArr p, TbLink link where p.levl = :levl and link.delYn = 'N' and p.linkId = link.linkId")
    List<TbLinkVrtxArr> findAllByLevl(@Param("levl") Integer levl);

}
