package cn.axzo.msg.center.notices.common.constans;

import java.util.regex.Pattern;

/**
 * 通用常量类
 *
 * @author zhaoyong_sh
 * @see CommonConstants
 * @since 2021-05-19 10:29
 */
public abstract class CommonConstants {

    /** MDC 日志 KEY */
    public static final String CTX_LOG_ID_MDC = "ctxLogId";

    /** 心跳 URI */
    public static final String HEARTBEAT_URI = "/checkDeath";

    /** 逗号分隔符 */
    public static final String COMMA_SYMBOL = ",";

    /** 最大重试次数 */
    public static final int MAX_RETRY_COUNT = 3;

    /** 验证码短信 code */
    public static final String CODE = "code";

    /** 钉钉 text 消息类型 */
    public static final String DING_TEXT_MESSAGE_TYPE = "text";

    /** 默认环境 */
    public static final String DEFAULT_ENV = "dev";

    /** Mock 渠道 */
    public static final String MOCK_CHANNEL = "mock";

    /** 指定渠道 */
    public static final String ASSIGN_CHANNEL = "assign_channel";

    /**
     * 消息模板变量表达式
     */
    public static final Pattern MESSAGE_TEMPLATE_PARAM_PATTERN = Pattern.compile("(\\$\\{)([\\w]+)(\\})");

}
