/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved. <a>http://www.crunii.com</a>
 */
package com.crunii.micro.common.constants;

/**
 * <pre>
 * redis的对象key，集中管理避免冲突
 * </pre>
 *
 * @author 田平 create 2018年11月6日下午2:16:25
 */
public class RedisKeys {

	public static final String TOKEN_WEB_KEY = CommonConstants.SCOPE_WEB + "_MICRO_TOKEN";

	public static final String TOKEN_PHONE_KEY = CommonConstants.SCOPE_PHONE + "_MICRO_TOKEN";

	public static final String MICRO_CAPTCHA_KEY_PREFIX = "MICRO_CAPTCHA_KEY_PREFIX_";

	public static final String LOGIN_PWD_ERROR_KEY_PREFIX = "MICRO_LOGIN_PWD_ERROR_KEY_";

	public static final String SMS_LOGIN_CODE = "SMS_LOGIN_CODE";

	public static final String SMS_TRY_LOGIN_CODE = "SMS_TRY_LOGIN_CODE";

	/**
	 * // 3600 秒
	 */
	public static final int TOKEN_WEB_INACTIVE_TIMEOUT = 3600;

	/**
	 * // 1天
	 */
	public static final int TOKEN_PHONE_INACTIVE_TIMEOUT = 3600 * 24;
	/**
	 * // 秒
	 */
	public static final int CAPTCHA_INACTIVE_TIMEOUT = 120;

	/**
	 * // 最大密码登录错误次数，超过后单位时间内不能登录
	 */
	public static final int LOGIN_PWD_MAX_ERROR_TIMES = 5;

	/**
	 * // 登录密码错误后多少时间不能从新登录单位小时
	 */
	public static final int LOGIN_PWD_MAX_ERROR_PERIOD = 1;

	/**
	 * 那些url记录日志的缓解key
	 */
	public static final String LOG_URLS_CACHE_KEY = "MICRO_LOG_URLS_CACHE_KEY";

	public static final String TEMPLATE_CACHE_KEY = "MICRO_TEMPLATE_CACHE_KEY";

	public static final String PHONE_TOKEN_USER_MAP_KEY = "MICRO_PHONE_TOKEN_USER_MAP_KEY";
	public static final String CAPTCHA_MAP_KEY = "CAPTCHA_MAP_KEY";
	public static final String LOGIN_PWD_ERROR_KEY = "LOGIN_PWD_ERROR_KEY";

	/**
	 * 分布式ID 服务器元数据管理的key
	 */
	public static final String DISTRIBUTED_SNOWFLAKE_KEY = "DISTRIBUTED_SNOWFLAKE_ID_KEY";


	/**
	 * 数据的缓存key
	 */
	public static final String TSM_URL_CACHE_KEY = "TSM_URL_CACHE_KEY";
	public static final String TSM_MENU_CACHE_KEY = "TSM_MENU_CACHE_KEY";
	public static final String TSM_APP_CONF_CACHE_KEY = "TSM_APP_CONF_CACHE_KEY";
	public static final String TSM_PROPERTY_VALUE_CACHE_KEY = "TSM_PROPERTY_VALUE_CACHE_KEY";

	public static final String RETRIEVE_PWD_KEY = "RETRIEVE_PWD_KEY";

	/**
	 * SSO相关的key
	 */
	public static final String SSO_AUTH_CODE_CACHE_KEY = "SSO_AUTH_CODE_CACHE_KEY";
	public static final String SSO_TOKEN_CACHE_KEY = "SSO_TOKEN_CACHE_KEY";

	public static final String LABEL_SYNCHRONOUS_TREE = "LABEL_SYNCHRONOUS_TREE";
	public static final String LABEL_USE_COUNT = "LABEL_USE_COUNT";

	public static final String HOT_LABEL_FORTY_EIGHT = "HOT_LABEL_FORTY_EIGHT";
	public static final String HOT_LABEL_LONG_TIME = "HOT_LABEL_LONG_TIME";

	public static final String MATCH_ACTIVITY = "MATCH_ACTIVITY";

	/**
	 * 图绘青春，热门问题key
	 */
	public static final String HOT_FILE_SEARCH = "HOT_FILE_SEARCH";

	/**
	 * 手机登录登录
	 */
	public static final String PHONE_SHORT_CODE = "PHONE_SHORT_CODE";

	/**
	 * 手机号注册
	 */
	public static final String PHONE_REGISTER = "PHONE_REGISTER";

	/**
	 * 手机号注册session
	 */
	public static final String PHONE_REGISTER_SESSION = "PHONE_REGISTER_SESSION";

	/**
	 * 首页地图数据key
	 */
	public static final String DASHBOARD_MAP_KEY = "DASHBOARD_MAP_KEY";

	/**
	 * 首页网站数据key
	 */
	public static final String WEBSITE_GATHER_KEY = "WEBSITE_GATHER_KEY";

	/**
	 * 系统主题key
	 */
	public static final String SYS_THEME_KEY = "SYS_THEME_KEY";

	/**
	 * APP签名key
	 */
	public static final String SIGN_KEY = "SIGN_KEY";

	/**
	 * 权限节点
	 */
	public static final String AUTH_TREE_NODE = "AUTH_TREE_NODE";

	/**
	 * 短信验证码key
	 */
	public static final String VALIDATE_CODE_KEY = "YCQ_YOUTH_Call_CREATE_APPEAL_VALIDATE_CODE:";
}
