using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WGShare.Domain.Constant { /// /// redis key 常量值 /// public class RedisKeyConstant { /// /// 会话管理 /// public class SessionManage { /// /// 在线人数 /// public static string GetOnlineUserKey(string tenantId) => $@"SessionManage:te_{tenantId}:OnlieUser"; /// /// 频道用户 /// /// /// /// public static string GetChannelUserKey(string tenantId, string roomNum) => $@"SessionManage:te_{tenantId}:ch_{roomNum}"; /// /// 用户参与频道 /// /// /// public static string GetUserJoinChannelKey(string uid) => $@"SessionManage:u_{uid}_join"; /// /// 获取频道全员观看对象 /// /// /// /// public static string GetChannelShowUserKey(string tenantId) => $@"SessionManage:te_{tenantId}:room_show_user"; } /// /// 持久化数据 /// public class Data { private static string _prefix = "data:"; /// /// 获取token /// /// /// public static string GetRefreshTokenKey(string refreshToken) => $@"{_prefix}refresh_tk:{refreshToken}"; public static string GetScreenShareIdKey => $@"{_prefix}screen_share_id"; /// /// 获取Accesstoken Redis Key /// /// /// public static string GetAccessTokenKey(string uid) => $@"{_prefix}access_tk:{uid}"; /// /// 获取已轮询过的用户 /// /// /// /// public static string GetPolledUserId(string tenantId, string roomNum) => $@"{_prefix}polled_uid:te_{tenantId}ch_{roomNum}"; } } }