package cn.reghao.oss.console.app.db.repository;

import cn.reghao.oss.console.app.model.po.UserNode;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @author reghao
 * @date 2024-02-27 09:49:12
 */
public interface UserNodeRepository extends JpaRepository<UserNode, Integer> {
    int countByNodeId(int nodeId);
    UserNode findByNodeIdAndUserId(int nodeId, int userId);
    Page<UserNode> findByUserId(int userId, Pageable pageable);
}
