UNPKG

@beincom/dto

Version:

Share dto for all projects of Beincom

56 lines (55 loc) 1.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SharedGroupCacheKey = void 0; const constants_1 = require("@beincom/constants"); /** * @deprecated Move to @beincom/constants@5.18.1 */ class SharedGroupCacheKey { static groupById(groupId) { return [SharedGroupCacheKey.PREFIX, SharedGroupCacheKey.hashTag, 'shared_group', groupId].join(':'); } static joinedGroupsOfUser(userId) { return [ SharedGroupCacheKey.PREFIX, SharedGroupCacheKey.hashTag, constants_1.CACHE_KEYS.JOINED_GROUPS, userId, ].join(':'); } static communityPermissionsOfUser(userId) { return [ SharedGroupCacheKey.PREFIX, SharedGroupCacheKey.hashTag, constants_1.CACHE_KEYS.COMMUNITY_PERMISSION, userId, ].join(':'); } static groupPermissionsOfUser(userId) { return [ SharedGroupCacheKey.PREFIX, SharedGroupCacheKey.hashTag, constants_1.CACHE_KEYS.GROUP_PERMISSION, userId, ].join(':'); } static showingBadgeOfUser(userId) { return [ SharedGroupCacheKey.PREFIX, SharedGroupCacheKey.hashTag, constants_1.CACHE_KEYS.SHOWING_BADGES, userId, ].join(':'); } static bannedTargetsOfUser(userId) { return [ SharedGroupCacheKey.PREFIX, SharedGroupCacheKey.hashTag, constants_1.CACHE_KEYS.BANNED_TARGETS_OF_USER, userId, ].join(':'); } } SharedGroupCacheKey.PREFIX = 'group'; SharedGroupCacheKey.hashTag = '{1}'; exports.SharedGroupCacheKey = SharedGroupCacheKey;