package com.YuyeTech.TPlat.repository;

import com.YuyeTech.TPlat.dataobject.FriendInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Optional;

public interface FriendInfoRepository extends JpaRepository<FriendInfo,String> {

    Page<FriendInfo> findAllByUserId(Pageable pageable, String userId);

    Optional<FriendInfo> findByUserIdAndFriendId(String userId,String friendId);

    void deleteByUserIdAndFriendId(String userId,String friendId);

}
