Add comment module

This commit is contained in:
Tim
2025-06-30 19:46:57 +08:00
parent 04e7aed9b8
commit ff64500ffd
6 changed files with 188 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
package com.openisle.repository;
import com.openisle.model.Comment;
import com.openisle.model.Post;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
public interface CommentRepository extends JpaRepository<Comment, Long> {
List<Comment> findByPostAndParentIsNullOrderByCreatedAtAsc(Post post);
List<Comment> findByParentOrderByCreatedAtAsc(Comment parent);
}