Merge branch 'backend' of https://lab.ssafy.com/s11-webmobile1-sub2/S11P12A701 into be/registration

This commit is contained in:
kgc91747 2024-08-08 16:31:17 +09:00
commit 8e411a974f

View File

@ -14,5 +14,7 @@ import java.util.List;
public interface QnaRepository extends JpaRepository<Qna, Long> { public interface QnaRepository extends JpaRepository<Qna, Long> {
List<Qna> findByLectureId(Long lecturerId); 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); Page<Qna> findByLectureId(Long lectureId, Pageable pageable);
} }