package com.sqx.common.constant;

/**
 * redis key 管理
 *
 * @author : codingliang
 * @date : 2024-09-09 11:50
 */
public interface RedisKey {

    /**
     * 插入订单锁
     */
    String INSERT_ORDER_LOCK = "wm:lock:order:insert:%s-%s";

    /**
     * 修改订单锁
     */
    String UPDATE_ORDER_LOCK = "wm:lock:order:update:%s";

    /**
     * 完成订单锁
     */
    String FINISH_ORDER_LOCK = "wm:lock:order:finish:%s";

    /**
     * 取消订单锁
     */
    String CANCEL_ORDER_LOCK = "wm:lock:order:cancel:%s";

    /**
     * 订单支付锁
     */
    String PAY_ORDER_LOCK = "wm:lock:order:pay:%s";

    /**
     * 订单序号锁 按店铺获取锁
     */
    String ORDER_SEQUENCE_LOCK = "wm:lock:order:sequence:%s";

    /**
     * 提现锁
     */
    String CASH_OUT_LOCK = "wm:lock:cash:out:%s";

    /**
     * 跑腿订单更新锁
     */
    String UPDATE_INDENT_LOCK = "wm:lock:indent:%s";

    /**
     * 聊天发起锁
     */
    String CHAT_CONVERSATIONS_INSERT_LOCK = "wm:lock:chat:add:%s-%s";

    /**
     * 店铺审核锁
     */
    String SHOP_AUTHENTICATION_LOCK = "wm:lock:shop:auth:%s";

    /**
     * 用户购买vip锁
     */
    String USER_BUY_VIP_LOCK = "wm:lock:vip:buy:%s";

    /**
     * 公共配置缓存key
     */
    String COMMON_INFO_CACHE_KEY = "wm:data:common:%s";

    /**
     * 用户信息缓存key
     */
    String USER_INFO_CACHE_KEY = "wm:data:user:%s";

    /**
     * 店铺缓存信息
     */
    String SHOP_INFO_CACHE_KEY = "wm:data:shop:%s";

    /**
     * 用户端小程序token
     */
    String MP_TOKEN_CACHE_KEY = "wm:data:wx:user-mp:token";

    /**
     * 骑手端端小程序token
     */
    String MP_OF_RIDER_TOKEN_CACHE_KEY = "wm:data:wx:rider-mp:token";

    /**
     * 商家端小程序token
     */
    String MP_OF_SHOP_TOKEN_CACHE_KEY = "wm:data:wx:shop-mp:token";

    /**
     * 订单超时锁
     */
    String TIME_OUT_LOCK = "wm:time:out:lock:%s";

    /**
     * 平台账单锁
     */
    String PLATFORM_BILL_LOCK = "wm:lock:platform-bill";
}
