package cn.novalon.gym.manage.sys.core.repository;

import cn.novalon.gym.manage.sys.core.domain.UserRole;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public interface IUserRoleRepository {

    Mono<UserRole> save(UserRole userRole);

    Mono<Void> deleteById(Long id);

    Mono<Void> deleteByUserId(Long userId);

    Mono<Void> deleteByRoleId(Long roleId);

    Flux<UserRole> findByUserId(Long userId);

    Flux<UserRole> findByRoleId(Long roleId);

    Mono<Long> countByUserId(Long userId);

    Mono<Long> countByRoleId(Long roleId);

    Flux<UserRole> findAll();

    Mono<UserRole> findById(Long id);
}
