package com.dbnt.kcscbackend.admin.boards.repository;

import com.dbnt.kcscbackend.admin.boards.entity.TnBbs;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface TnBbsRepository extends JpaRepository<TnBbs, Long> {

    @Query(value = "SELECT * FROM tn_bbs WHERE use_yn = 'Y' ORDER BY bbs_seq DESC", nativeQuery = true)
    List<TnBbs> findAllByOrderByBbsSeqDesc();

}
