package com.ruoyi.common.constant;

import io.jsonwebtoken.Claims;

/**
 * 通用常量信息
 *
 * @author ruoyi
 */
public class Constants
{
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * www主域
     */
    public static final String WWW = "www.";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**

    //MQ相关---------------------------------------------------------

    /**
     * 限流 redis key
     */
    //public static final String DEVICE_HEART_KEY = "device:heart:";

    /**
     * 设备状态 redis key  alarm存储用 暂时未用上
     */
    public static final String DEVICE_STATE_KEY = "device:state:";

    /**
     * 任务 -> 状态key
     */
    //public static final String TASK_STATUS_KEY = "task:status:";


    /**
     * 打印文件 redis key
     */
    //public static final String TASK_JOBINFO_KEY = "task:jobInfo:";


    /**
     * 用户登录 tel key
     */
    public static final String LOGIN_TOKEN_ROLE_KEY = "login_token_role:";


    /**
     * 用户登录 语言
     */
//    public static final String LOGIN_LANG_KEY = "login_lang:";

    /**
     * 设备 -> 权限key
     */
    public static final String DEVICE_ROLE_KEY = "device:role:";


    /**
     * 用户 -> 消息内容
     */
    public static final String USER_SEND_MSG_KEY = "user:send_msg:";

    /**
     * 用户 -> 消息内容
     */
    public static final String USER_WX_MSG_KEY = "user:wx_msg:";

    /**
     * 设备 -> 权限key 机器id
     */
    public static final String MACHINE_ID = "machine_id";


    /**
     * 设备 -> 权限key 权限Key
     */
    public static final String ROLE_KEY = "role_key";
    public static final String DEVICE_CODE = "device_code";

    public static final String UUID = "uuid";
    public static final String SUPER_ADMIN = "admin";

    //---------------------------------------------------------



    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 2;

    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * 令牌前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /**
     * 用户ID
     */
    public static final String JWT_USERID = "userid";

    /**
     * 用户名称
     */
    public static final String JWT_USERNAME = Claims.SUBJECT;

    /**
     * 用户头像
     */
    public static final String JWT_AVATAR = "avatar";

    /**
     * 创建时间
     */
    public static final String JWT_CREATED = "created";

    /**
     * 用户权限
     */
    public static final String JWT_AUTHORITIES = "authorities";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 大屏映射路径 前缀
     */
    public static final String GOVIEW_PREFIX = "/goview";

    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi:";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap:";

    /**
     * LDAPS 远程方法调用
     */
    public static final String LOOKUP_LDAPS = "ldaps:";

    /**
     * 定时任务白名单配置（仅允许访问的包名，如其他需要可以自行添加）
     */
    public static final String[] JOB_WHITELIST_STR = { "com.ruoyi" };

    /**
     * 用户语言
     */
    public static final String USER_LANGUAGE_KEY = "user:language:";

    /**
     * 首页大屏地址参数key
     */
    public static final String MAIN_PAGE_URL_KEY = "mainPage.URL.";

    /**
     * 首页大屏地址参数key
     */
    public static final String DEVICE_DETAIL_PAGE_URL_KEY = "deviceDetailPage.URL.";

    /**
     * 流程面板地址参数key
     */
    public static final String PROCESS_PAGE_URL_KEY = "processPage.URL.";

    /**
     * 知识面板地址参数key
     */
    public static final String KNOWLEDGE_PAGE_URL_KEY = "knowledgePage.URL.";

    /**
     * 工单面板地址参数key
     */
    public static final String WORK_ORDER_PAGE_URL_KEY = "workOrderPage.URL.";

    /**
     * 评估子流程
     */
    public static final String ASSESS_INSTANCE_KEY = "process:instance:assess:";

    /**
     * 前处理子流程
     */
    public static final String OPTIMIZE_INSTANCE_KEY = "process:instance:optimize:";

    /**
     * 设备视频推流
     */
    public static final String VIDEO_STREAM_STATUS_KEY = "video:stream:status:";

    public static final String VIDEO_STREAM_COUNT_KEY = "video:stream:count:";

    public static final String CAMERA_STATUS_KEY = "camera:status:";

    /**
     * 排版模型
     */
    public static final String COMPOSE_INSTANCE_KEY = "process:instance:compose:";

    /**
     * 打印仿真
     */
    public static final String PRINT_SIMULATE_INSTANCE_KEY = "process:instance:printSimulate:";

    /**
     * 打印仿真零件组合
     */
    public static final String PRINT_SIMULATE_CHILD_INSTANCE_KEY = "process:instance:child:printSimulate:";

    /**
     * 切片/路径规划子项
     */
    public static final String SLICE_PATH_PLANNING_CHILD_INSTANCE_KEY = "process:instance:child:slicePathPlanning:";

    /**
     * 切片/路径规划
     */
    public static final String SLICE_PATH_PLANNING_INSTANCE_KEY = "process:instance:slicePathPlanning:";

    /**
     * 在线排单
     */
    public static final String ONLINE_ORDER_CHILD_INSTANCE_KEY = "process:instance:child:onlineOrder:";

    /**
     * 在线排单
     */
    public static final String ONLINE_ORDER_INSTANCE_KEY = "process:instance:onlineOrder:";

    /**
     * 排单确认子项
     */
    public static final String SCHEDULE_CONFIRM_CHILD_INSTANCE_KEY = "process:instance:child:scheduleConfirm:";

    /**
     * 排单确认
     */
    public static final String SCHEDULE_CONFIRM_INSTANCE_KEY = "process:instance:scheduleConfirm:";

    /**
     * 打印任务子项
     */
    public static final String PRINT_TASK_CHILD_INSTANCE_KEY = "process:instance:child:printTask:";

    /**
     * 打印任务
     */
    public static final String PRINT_TASK_INSTANCE_KEY = "process:instance:printTask:";

    /**
     * 取件任务子项
     */
    public static final String COLLECT_PART_CHILD_INSTANCE_KEY = "process:instance:child:collectPart:";

    /**
     * 取件确认任务
     */
    public static final String COLLECT_PART_INSTANCE_KEY = "process:instance:collectPart:";

    /**
     * 取件确认任务子项
     */
    public static final String COLLECT_CONFIREM_CHILD_INSTANCE_KEY = "process:instance:child:collectConfirm:";

    /**
     * 取件确认任务
     */
    public static final String COLLECT_CONFIREM_INSTANCE_KEY = "process:instance:collectConfirm:";

    /**
     * 打印质检任务子项   PrintInspection
     */
    public static final String PRINT_INSPECTION_CHILD_INSTANCE_KEY = "process:instance:child:printInspection:";

    /**
     * 打印质检任务  PrintInspection
     */
    public static final String PRINT_INSPECTION_INSTANCE_KEY = "process:instance:printInspection:";
    /**
     * 成品入库任务子项   warehouse
     */
    public static final String WAREHOUSE_CHILD_INSTANCE_KEY = "process:instance:child:warehouse:";

    /**
     * 成品入库任务
     */
    public static final String WAREHOUSE_INSTANCE_KEY = "process:instance:warehouse:";

    public static final String KNOWLEDGE_INFO_VIEW_COUNT_KEY = "knowledge:info:count:view:";

    /**
     * 摄像头图像
     */
    public static final String DEVICE_CAMERA_IMAGE_KEY = "camera:image:";

    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
            "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" };
}
