package com.slodon.b2b2c.core.constant;

/**
 * redis缓存相关常量
 */
public class RedisConst {

    /**
     * 省市区三级地区全部数据
     */
    public final static String REGION = "region";

    /**
     * 移动端和pc端首页装修数据
     */
    public final static String MOBILE_INDEX = "mobile_index";
    public final static String PC_INDEX = "pc_index";

    /**
     * 商品详情数据
     */
    public final static String GOODS_DETAIL = "goods_detail";

    /**
     * 一级商品分类数据
     */
    public final static String GOODS_CATEGORY = "goods_category";
    /**
     * front端三级全部商品分类数据
     */
    public final static String FRONT_GOODS_CATEGORY = "front_goods_category";

    /**
     * reids中保存的预售商品已购买数量的key前缀,key=前缀+goodsId+memberId
     */
    public static final String PRE_SELL_PURCHASED_NUM_PREFIX = "pre_sell_purchased_num_";

    /**
     * reids中保存的阶梯团商品已购买数量的key前缀,key=前缀+goodsId+memberId
     */
    public static final String LADDER_GROUP_PURCHASED_NUM_PREFIX = "ladder_group_purchased_num_";

    /**
     * reids中保存的秒杀商品库存的key前缀,key=前缀+productId
     */
    public static final String REDIS_SECKILL_PRODUCT_STOCK_PREFIX = "seckill_stage_product_stock_";
    /**
     * reids中保存的秒杀商品限购的key前缀,key=前缀+productId
     */
    public static final String REDIS_SECKILL_PRODUCT_BUY_LIMIT_PREFIX = "seckill_stage_product_upper_limit_";
    /**
     * reids中保存的秒杀商品用户已购买数量的key前缀,key=前缀+productId+_+memberId
     */
    public static final String REDIS_SECKILL_MEMBER_BUY_NUM_PREFIX = "seckill_member_buy_num_";

    /**
     * reids中保存的拼团商品已购买数量的key前缀,key=前缀+goodsId+memberId
     */
    public static final String SPELL_PURCHASED_NUM_PREFIX = "spell_purchased_num_";

    /**
     * reids中保存的直播rtmp的key前缀,key=前缀+liveId
     */
    public static final String LIVE_RTMP_PREFIX = "live_rtmp_";

    /**
     * reids中保存的直播m3u8的key前缀,key=前缀+liveId
     */
    public static final String LIVE_M3U8_PREFIX = "live_m3u8_";

    /**
     * reids中保存的随机金额优惠券的key前缀,key=前缀+couponId
     */
    public static final String COUPON_PREFIX = "coupon_";

    /**
     * reids中保存的抽奖活动的key前缀,key=前缀+drawId
     */
    public static final String DRAW_PREFIX = "draw_";

    public static final String SLD_PC_EMAIL_VERIFY_CODE_LIMIT="sld_pc_verify_code_limit:email::";

    public static final String SLD_PC_MOBILE_VERIFY_CODE_LIMIT="sld_pc_verify_code_limit:mobile::";

    /**
     * reids中保存邮箱用户注册,key=前缀+email
     */
    public static final String SLD_PC_NEW_REGISTER_USER_EMAIL = "sld_pc_new_register_user:email::";

    /**
     * reids中保存手机用户注册,key=前缀+mobile
     */
    public static final String SLD_PC_NEW_REGISTER_USER_MOBILE = "sld_pc_new_register_user:mobile::";

    /**
     * reids中保存邮箱用户忘记密码,key=前缀+email
     */
    public static final String SLD_PC_FORGET_PWD_USER_EMAIL = "sld_pc_forget_pwd_user:email::";

    /**
     * reids中保存手机用户忘记密码,key=前缀+mobile
     */
    public static final String SLD_PC_FORGET_PWD_USER_MOBILE = "sld_pc_forget_pwd_user:mobile::";

    /**
     * reids中保存邮箱用户忘记密码,key=前缀+email
     */
    public static final String TIME = "sld_pc_forget_pwd_user:email::";

    /**
     * 用户注册、忘记密码链接有效时间：24小时
     */
    public static final long REGISTER_USER_AND_FORGETPWD_USER_EMAIL_LINK_EXPIRE_TIME = 60L * 10 * 6 * 24;


    /**
     * 用户注册、忘记密码验证码有效时间：5min
     */
    public static final long REGISTER_USER_AND_FORGETPWD_USER_EMAIL_VERIFICATION_CODE_EXPIRE_TIME = 60L * 5;

    /**
     * 单点登录链接有效时间：600秒即10分钟
     */
    public static final long OAUTH_SSO_LINK_EXPIRE_TIME = 60L * 10;

    /**
     * reids中保存PC商城单点登录用户id,key=前缀+uuid
     */
    public static final String SLD_PC_OAUTH_USER_KEY = "sld_pc_oauth_user:key::";

    /**
     * reids中保存Seller单点登录用户id,key=前缀+uuid
     */
    public static final String SLD_SELLER_OAUTH_USER_KEY = "sld_seller_oauth_user:key::";

}
