package com.sckw.redis.constant;

/**
 * @desc: redis常量
 * @author: yzc
 * @date: 2023-06-09 11:27
 */
public class RedisConstant {

    /**
     * 短信验证码值key
     */
    public static final String MESSAGE_SMS_VERIFY_CODE_VALUE_KEY = "message:sms:verifyCode:value:%s:%s";
    /**
     * 短信验证码请求key
     */
    public static final String MESSAGE_SMS_VERIFY_CODE_REQUEST_KEY = "message:sms:verifyCode:request:%s:%s";

    /**
     * 短信验证码请求时间
     */
    public static final Long SMS_VERIFY_CODE_REQUEST_TIME = 60L;
    /**
     * 短信验证码锁key
     */
    public static final String MESSAGE_SMS_VERIFY_CODE_LOCK_KEY = "message:sms:verifyCode:lock:%s:%s";
    /**
     * 短信验证码有效时间（秒）5分钟
     */
    public static final Long SMS_VERIFY_CODE_VALID_TIME = 300L;

    /**
     * message消费请求key
     */
    public static final String MESSAGE_CONSUMER_REQUEST_KEY = "message:msg:consumer:request:%s";

    /**
     * 商品更新库存锁key
     */
    public static final String GOODS_UPDATE_AMOUNT_KEY = "product:goods:update:amount:%s";
    /**
     * 更新贸易订单委托量、已履约量锁key
     */
    public static final String TORDER_UPDATE_AMOUNT_KEY = "order:trade:update:amount:%s";
    /**
     * 合同签约完成更新贸易订单状态锁key
     */
    public static final String TORDER_CONTRACT_UPDATE_KEY = "order:trade:contract:update:%s";

    /**
     * 合同签约完成更新物流订单状态锁key
     */
    public static final String LOGISTICS_ORDER_CONTRACT_UPDATE_KEY = "order:trade:logistics:update:%s";
    /**
     * 生成贸易订单号锁key
     */
    public static final String TORDER_NO_GENERATE_KEY = "order:trade:no:generate:%s";

    /**
     * 生成物流订单号锁key
     */
    public static final String LOGISTICS_NO_GENERATE_KEY = "order:logistics:no:generate:%s";


    /**
     * 生成物流订单号锁key
     */
    public static final String WAYBILL_NO_GENERATE_KEY = "order:waybill:no:generate:%s";


    /**
     * 消费请求有效时间（秒）
     */
    public static final Long CONSUMER_REQUEST_VALID_TIME = 180L;
    /**
     * 结算单锁
     */
    public static final String SETTLEMENT_KEY = "sckw:kst:%s";
    /**
     * 企业关联钱包
     */
    public static final String WALLET_ENT = "wallet:ent";
    /**
     * 钱包关联企业
     */
    public static final String WALLET_UID = "wallet:uid";
    /**
     * 电子钱包时间记录
     * uid:filter:channel->time
     */
    public static final String WALLET_TIME = "%s:%s:%s";

}
