package com.m2pool.common.core;

/**
 * @Description TODO
 * @Date 2024/6/12 15:35
 * @Author dy
 */
public class RedisTransKey {


    public static final String RedisNameSpace="user";
    public static final String RedisTokenName="token";
    public static final String RedisLoginName="login";
    public static final String RedisEmailCodeName="emailCode";
    public static final String RedisAddCreditEmailCodeName="addCreditEmailCode";
    public static final String RedisResetPwdCodeName="restPwdCode";
    public static final String RedisUpdatePwdCodeName="updatePwdCode";

    public static String setEmailKey(String key){
        return RedisNameSpace+":"+RedisEmailCodeName+":"+key;
    }
    public static String setRootKey(String key){
        return RedisNameSpace+":"+key+":";
    }
    public static String setTokenKey(String key){
        return RedisNameSpace+':'+RedisTokenName+":"+key;
    }
    public static String setLoginKey(String key){
        return RedisNameSpace+':'+RedisLoginName+":"+key;
    }
    public static String setResetPwdKey(String key){
        return RedisNameSpace+":"+RedisResetPwdCodeName+":"+key;
    }
    public static String setUpdatePwdKey(String key){
        return RedisNameSpace+":"+RedisUpdatePwdCodeName+":"+key;
    }

    public static String setAddCreditEmailKey(String key){
        return RedisNameSpace+":"+RedisAddCreditEmailCodeName+":"+key;
    }

    public static String getEmailKey(String key){return setEmailKey(key);}
    public static String getRootKey(String key){return setRootKey(key);}
    public static String getTokenKey(String key){return setTokenKey(key);}
    public static String getLoginKey(String key){return setLoginKey(key);}
    public static String getResetPwdKey(String key){return setResetPwdKey(key);}
    public static String getUpdatePwdKey(String key){return setUpdatePwdKey(key);}
    public static String getAddCreditEmailKey(String key){return setAddCreditEmailKey(key);}

}
