package cn.novalon.gym.manage.gateway.service;

import cn.novalon.gym.manage.gateway.model.Permission;
import cn.novalon.gym.manage.gateway.model.Role;
import cn.novalon.gym.manage.gateway.model.User;

import java.util.List;
import java.util.Set;

public interface PermissionService {
    
    User getUserById(Long userId);
    
    List<Role> getUserRoles(Long userId);
    
    Set<Permission> getUserPermissions(Long userId);
    
    boolean hasPermission(Long userId, String path, String method);
    
    Set<String> getPermissionPaths(Long userId, String method);
    
    void clearCache(Long userId);
    
    void clearAllCache();
}