package com.ningdatech.carapi.sys.utils;

/**
 * <p>
 * AuthCacheKeyUtils
 * </p>
 *
 * @author PoffyZhang
 */
public class AuthCacheKeyUtils {

    private static final String USER_RESOURCE_CKP = "user_resource:";
    private static final String USER_MENU_CKP = "user_menu:";
    private static final String USER_ROLE_CKP = "user_role:";
    private static final String ROLE_RESOURCE_CKP = "role_resource:";
    private static final String ROLE_MENU_CKP = "role_menu:";

    public static String roleResourceCacheKey(Long roleId) {
        return ROLE_RESOURCE_CKP + roleId;
    }

    public static String roleMenuCacheKey(Long roleId) {
        return ROLE_MENU_CKP + roleId;
    }

    public static String userResourceCacheKey(Long userId) {
        return USER_RESOURCE_CKP + userId;
    }

    public static String userMenuCacheKey(Long userId) {
        return USER_MENU_CKP + userId;
    }

    public static String userRoleCacheKey(Long userId) {
        return USER_ROLE_CKP + userId;
    }

}
