feat: qna 조회 수정

This commit is contained in:
박정민 2024-08-08 16:10:45 +09:00
parent 7f20b2f1ae
commit 6b81a22d6f

View File

@ -14,5 +14,7 @@ import java.util.List;
public interface QnaRepository extends JpaRepository<Qna, Long> {
List<Qna> findByLectureId(Long lecturerId);
@Query("SELECT q FROM Qna q WHERE q.lecture.id = :lectureId ORDER BY q.createdAt DESC")
Page<Qna> findByLectureId(Long lectureId, Pageable pageable);
}