namespace JiaZhiQuan.Common
{
    public static partial class CacheKeys
    {
        /// <summary>
        /// 用户在线状态判断，过期时间
        /// </summary>
        public static int UserClientOnlineExpirationTime = 30;
        public static string UserClientOnline(long userId)
        {
            return GenerateKey($"im:online:{userId}");
        }

        /// <summary>
        /// 会话最后一条消息的内容
        /// </summary>
        /// <param name="chatId"></param>
        /// <returns></returns>
        public static int ChatLastMessageInfoExpirationTime = 60 * 60;
        public static string ChatLastMessageInfo(long chatId)
        {
            return GenerateKey($"im:chat:lastMessage:{chatId}");
        }
    }
}
