package studycave.studycaverestservice.model.StudyGroupComment;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface StudyGroupCommentRepository extends JpaRepository<StudyGroupComment , Long> {

    @Query("select c from StudyGroupComment c where ( c.contentId = :id and c.contentType = :t )")
    List<StudyGroupComment> findCommentsByContent(@Param("t") String t, @Param("id") Long id);
}
