package com.izouma.jmrh.repo;

import com.izouma.jmrh.domain.LikeRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface LikeRecordRepo extends JpaRepository<LikeRecord, Long>, JpaSpecificationExecutor<LikeRecord> {
    LikeRecord findByPostIdAndUserId(Long postId, Long userId);

    LikeRecord findByCommentIdAndUserId(Long commentId, Long userId);

    List<LikeRecord> findByUserIdAndPostIdIn(Long userId, Iterable<Long> postId);

    List<LikeRecord> findByUserIdAndCommentIdIn(Long userId, Iterable<Long> commentId);
}