package com.xinyilu.common.constant;

import io.jsonwebtoken.Claims;

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

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

    /**
     * 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";

    /**
     * 验证码有效期（分钟）
     */
    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";

    /**
     * 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.xinyilu"};

    /**
     * 定时任务违规的字符
     */
    public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
            "org.springframework", "org.apache", "com.xinyilu.common.utils.file"};
    /**
     * 测试批次前缀
     */
    public static final String PC_PREFIX = "PC";

    /**
     * 测试项目分类前缀
     */
    public static final String FL_PREFIX = "FL";

    /**
     * 非统一指标类型常量
     */
    public static final String DISUNITY_STANDARD = "disunity_standard";

    /**
     * 统一指标类型常量
     */
    public static final String UNIFIED_STANDARD = "unified_standard";

    /**
     * 测试项目数值类型
     */
    public static final String ITEM_NUMBER = "number";

    /**
     * 测试项目文本类型
     */
    public static final String ITEM_TEXT = "text";

    /**
     * 管理员角色标识
     */
    public static final String ADMIN_ROLE = "admin";

    /**
     * 区域角色标识
     */
    public static final String REGION_ROLE = "region";

    /**
     * 幼儿园园长角色标识
     */
    public static final String ENCHOU_ROLE = "enchou";

    /**
     * 保健师角色标识
     */
    public static final String HEALTHCARE_ROLE = "healthcare";

    /**
     * 家长角色标识
     */
    public static final String PARENT_ROLE = "parent";

    /**
     * 教师角色标识
     */
    public static final String TEACHER_ROLE = "teacher";

    /**
     * 市级角色标识
     */
    public static final String CITY = "city";

    /**
     * 园所角色标识
     */
    public static final String GARDEN = "garden";

    /**
     * 男性标识
     */
    public static final String MALE = "MALE";

    /**
     * 女性标识
     */
    public static final String FEMALE = "FEMALE";

    /**
     * 男性标识
     */
    public static final String MALE_NAME = "男";

    /**
     * 女性标识
     */
    public static final String FEMALE_NAME = "女";

    /**
     * 微信小程序ACCESS_TOKEN前缀
     */
    public static final String APPLET_ACCESS_TOKEN = "APPLET_ACCESS_TOKEN_";

    /**
     * 幼儿检测报告标题名称
     */
    public static final String STUDENT_CHECK_REPORT_NAME = "幼儿体质检测报告书";

    /**
     * 幼儿园综合体质分析检测报告标题名称
     */
    public static final String KINDERGARTEN_CONSTITUTION_CHECK_REPORT_NAME = "幼儿园综合体质分析";

    /**
     * 幼儿检测报告作者
     */
    public static final String STUDENT_CHECK_REPORT_AUTHOR = "新医路信息科技有限公司";

    /**
     * 幼儿检测报告创建者
     */
    public static final String STUDENT_CHECK_REPORT_CREATOR = "新医路信息科技有限公司";

    /**
     * 学生报告Redis前端
     */
    public static final String STUDENT_CHECK_REPORT_PREFIX = "PCR";


    /**
     * 幼儿园报告编号
     */
    public static final String KINDERGARTEN_CHECK_REPORT_PREFIX = "KCR";


    /**
     * 民族的字典类型
     */
    public static final String NATION_TYPE = "nation_type";

    /**
     * 幼儿检测报告标题名称
     */
    public static final String KINDERGARTEN_SIDE_ANALYSIS = "幼儿园综合分析报告书";

    /**
     * 幼儿检测报告标题名称
     */
    public static final String AVERAGE_HEIGHT_WEIGHT_EACH_GRADE = "各年级男/女平均身高体重检测报告书";


    /**
     * 所在区的级别标识
     */
    public static final Integer REGION_LEVEL = 3;

    /**
     * 所在市的级别标识
     */
    public static final Integer CITY_LEVEL = 2;

    /**
     * 国民体质测定评判等级
     */
    public static final String ROOT_CATEGORY_NAME = "国民体质测定";

    /**
     * 检测报告-未审核状态
     */
    public static final Integer CHECK_STATUS = 0;
    /**
     * 审核报告类型-个人
     */
    public static final String PERSONAL = "PERSONAL";
    /**
     * 审核报告类型-幼儿园
     */
    public static final String KINDERGARTEN = "KINDERGARTEN";

    /**
     * Excel文件格式后缀
     */
    public static final String XLSX = "xlsx";

    /**
     * Excel文件格式后缀
     */
    public static final String XLS = "xls";

    /**
     * 个人成绩信息导入模板
     */
    public static final String TEST_ITEM_SCORE_TEMPLATE = "1";
}
