package ru.bvn13.voidforum.repositories; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import ru.bvn13.voidforum.models.Comment; import ru.bvn13.voidforum.models.Post; import java.util.List; @Repository public interface CommentRepository extends JpaRepository { List findAllByPostOrderById(Post post); List findAllByPostAndParentCommentOrderById(Post post, Comment parentComment); List findAllByPostAndDeletedMarkOrderById(Post post, Boolean deletedMark); List findAllByPostAndParentCommentAndDeletedMarkOrderById(Post post, Comment parentComment, Boolean deletedMark); }