/*
 * 由SharpDevelop创建。
 * 用户： Administrator
 * 日期: 2019-01-02
 * 时间: 13:07
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;
using Server.Data.Module;
using GameData;

namespace Server.DB.Redis
{
	/// <summary>
	/// redis字典
	/// </summary>
	public static class RedisDictionary
	{
        /// <summary>
        /// 配置所在的redis数据库
        /// </summary>
        public const int configDb = 1;
        
        /// <summary>
        /// 缓存数据库
        /// </summary>
        public const int cachedb = 1;

        /// <summary>
        /// 版本数据库
        /// </summary>
        public const int clientverdb = 2;

        /// <summary>
        /// 聊天缓存的消息数据
        /// </summary>
        public const int chatmessagedb = 3;

        /// <summary>
        /// 玩家状态存储库
        /// </summary>
        public const int PlayerState = 4;

        /// <summary>
        /// 统计库-6381
        /// </summary>
        public const int Statistics = 6;
        
        /// <summary>
        /// 游戏服务器细节信息
        /// </summary>
        public const string GameSerinfoDetail = "GameSerinfoDetail";

        /// <summary>
        /// 所有的服务器配置
        /// </summary>
        public const string AllServerConfig = "AllServerConfig";

        public const string AllServerConfigVer = "AllServerConfig:ver";

        /// <summary>
        /// 存储配置服务器用的Key    todo 这个key废弃了 1 号库
        /// </summary>
        public const string GameConfigServerLuBanKey = "GameConfigServerLuBan";

        /// <summary>
        /// 玩家活动数据
        /// </summary>
        public const string ActivityPlayerData = "Game:ActivityPlayerData:{0}";
        
        #region 模块数据表

        /// <summary>
        /// 权重
        /// </summary>
        public const string weightsField = "Weights";
		
		/// <summary>
		/// 是否死亡
		/// </summary>
		public const string dieField = "isDie";
		
		/// <summary>
		/// 模块数据表
		/// </summary>
		public const string tbModuleData = "tbModuleData";
		
        /// <summary>
        /// 节点名称
        /// </summary>
		public const string moduleNames = "nodenames";

		#endregion
		
		#region ModuleOnlineTab
		
		/// <summary>
		/// 在线模块编号表
		/// </summary>
		public const string tbModuleNum = "tbModuleNum";
		
		/// <summary>
		/// 
		/// </summary>
		/// <param name="util"></param>
		/// <returns></returns>
		public static string dbModuleNumKey(ModuleUtile util){
			return tbModuleData + "." + util.id;
		}
		
		/// <summary>
		/// 
		/// </summary>
		/// <param name="ModuleUtileId"></param>
		/// <returns></returns>
		public static string dbModuleNumKey(int ModuleUtileId){
			return tbModuleData + "." + ModuleUtileId;
		}
		
		#endregion
		
		/// <summary>
		/// 模块名称表
		/// </summary>
		public const string tbModuleName = "Game:tbModuleName";
		
		/// <summary>
		/// 游戏信息表名 存储gameid gamesty
		/// </summary>
		public const string GameInfoTabName = "Game:NodeInfo:GamesInfo";
		
		
		#region friendRoom
		/// <summary>
		/// 上次创建房间的时间  数据类型hash key1 lastCreateRoomTime 上次的创建时间  key2 lastRoomNum 上次的房间号
		/// </summary>
		public const string lastRoomNum = "Game:FriendRoom:lastRoomNum";
		
		/// <summary>
		/// 上次创建房间的时间
		/// </summary>
		public const string lastCreatRoomTime = "Game:FriendRoom:lastDateTime";
		
		/// <summary>
		/// 上次创建房间的房间号
		/// </summary>
		public const string lastCreateRoomNum = "Game:FriendRoom:lastRoomNum";
		
		/// <summary>
		/// 房间号标记 数据类型 string key=roomTag+"roomNum"; 存储的房间唯一码
		/// </summary>
		public const string roomTag = "Game:FriendRoom:Room.";
		
        /// <summary>
        /// 玩家的房间号以及唯一码信息
        /// </summary>
        public const string PlayerRoomNum = "Game:FriendRoom:Player:";

		/// <summary>
		/// 房间其他字段 
		/// key1 friendRoomField+"唯一吗" hash 房间详细数据
		/// key3 friendRoomField+"唯一吗."+"每局详情_idx" hash 存储每局分数
		/// </summary>
		public const string friendRoomField = "Game:FriendRoom:weiyima:";
		
		/// <summary>
		/// 朋友房战斗数据_用来恢复用的
		/// </summary>
		public const string friendRoomfightdata = "Game:FriendRoom:data:";
		
		/// <summary>
		/// 朋友房战斗记_用来回放用的
		/// </summary>
		public const string friendRoomfightRecord = "Game:FriendRoom:Record:";
		
		#endregion
		
		
	}
}
