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

import com.its.op.entity.its.vds.TbVdsDtct;
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 TbVdsDtctRepository extends JpaRepository<TbVdsDtct, Long>, JpaSpecificationExecutor<TbVdsDtct> {

    @Query("select p from TbVdsDtct p inner join fetch p.vds left outer join p.link link")
    List<TbVdsDtct> findAll();

    @Query("select p from TbVdsDtct p inner join fetch p.vds left outer join p.link link where p.delYn = 'N'")
    List<TbVdsDtct> findAllList();
}
