package com.dbnt.sims.publicBoard.repository;

import com.dbnt.sims.publicBoard.model.PublicComment;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;


public interface PublicCommentRepository extends JpaRepository<PublicComment, PublicComment.PublicCommentId> {

  List<PublicComment> findByPublicKeyAndParentCommentOrderByCommentKeyAsc(Integer publicKey, Integer parentComment);
  Optional<PublicComment> findTopByPublicKeyOrderByCommentKeyDesc(Integer publicKey);

}
