package com.goafanti.permission.service;

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

import com.goafanti.common.model.Role;
import com.goafanti.permission.bo.RoleBo;

public interface RoleService {

	int insert(List<Role> records);

	// 根据用户ID查询角色（role），放入到Authorization里。
	Set<String> findRoleByUserId(String userId);

	List<RoleBo> findRoles();

	int deleteByPrimaryKeys(List<String> records);

	int bindPermission(String roleId, String permissionId);

	int unbindPermission(String roleId, String permissionId);

	int bindUser(String roleId, String userId);

	int unbindUser(String roleId, String userId);

	int insert(Role record, List<String> permissions);

}
