package com.codenetworkz.blog.repositories;

import com.codenetworkz.blog.models.Comment;

import com.codenetworkz.blog.models.Post;
import com.codenetworkz.blog.models.Status;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentRepository extends JpaRepository<Comment, Long> {

    @Query(value ="select c from  Comment c where c.isDelete =:status" )
    List<Comment> findAllAndIsDelete(Status status);
}
