package cc.smtweb.framework.core.common;

/**
 * Created by Akmm at 2022/3/23 9:46
 */
public interface SwConsts {
    class SysParam {
        //开发调试模式
        public static boolean SYS_DEBUG = true;
        //系统启动完成
        public static boolean SYS_STARTED = false;
        //运行的项目，多个用半角逗号分隔
        public static String RUN_PROJECTS = "";
        //启动时赋值:服务器编号
        public static int machineId;
        //是否执行定时任务
        public static boolean enableJob = false;
        //是否启用canal
        public static boolean enableCanal = false;
    }
    //事件常量
    class EventConst {
        // 登录映射
        public static final String LOGIN_MAPPING = "LOGIN_MAPPING";
        //登录成功后事件
        public static final String LOGIN_SUCCESS = "LOGIN_SUCCESS";
        //登录失败后事件
        public static final String LOGIN_FAIL = "LOGIN_FAIL";
    }
    //错误码
    interface ErrorCode {
        //未登录
        int NO_LOGIN = 101;
        //指纹错误
        int TOKEN_INVALID = 102;
    }

    //启动顺序默认值
    int DEFAULT_ORDER = 1;

    //缓存中：树节点按parent的key
    String KEY_PARENT_ID = "pr";
    //级次码、字符串连接符
    String SPLIT_CHAR = "-";
    //默认根节点
    String DEF_ROOT_ID = "-1";
    long DEF_ROOT_ID_LONG = -1;
    //模型模板对应的路径，待扩展
    String modelPath = "default";

    //列表分页的页码和每页记录数
    String PARAM_PAGE = "page";
    String PARAM_ROWS = "rows";
    String TOTAL_KEY = "total_count";
    String DEF_DB_NAME = "sys";
    //id自动对应的文本的后缀
    String TEXT_SUFFIX = "_text";
    String NAME_ID = "id";

    String LOGIN_VERIFY_CODE = "_VERIFY_CODE";
    String _LOGIN_USER_ID_IN_SESSION = "_LOGIN_USER_ID_IN_SESSION";

    //定时任务key
    String REDIS_KEY_BASE_JOB = "jobexe";
    // params 参数中的header key
    String PARAMS_HEADER_KEY ="_header";
}
