package com.jeethink.common.constant;

import org.omg.CORBA.PUBLIC_MEMBER;

/**
 * 通用常量信息
 * 
 * @author jeethink
 */
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 LOGIN_FAIL = "Error";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";
    
    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

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

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

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

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

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

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

    public static final String ARCHIVES_TYPE_RS  ="0";//人事档案类型
    public static final String ARCHIVES_TYPE_JK ="1";//健康档案类型
    public static final String ARCHIVES_TYPE_PX  ="2";//培训档案类型

    public static final String DELETED_STATUS_NO="0";//档案未删除
    public static final String DELETED_STATUS_YES="1";//档案已删除

    public static final String APPROVE_PASS = "1";//审核通过
    public static final String APPROVE_REJECT = "0";//审核不通过

    public static final String FLOW_TYPE_RECEIVE="1";//档案接收流程
    public static final String FLOW_TYPE_DESTROY="2";//档案销毁流程
    public static final String FLOW_TYPE_BORROW="3";//档案借阅流程
    public static final String FLOW_TYPE_BACK="4";//档案借阅归还流程

    public static final String FLOW_STATUS_UNDERWAY     = "0";//进行中
    public static final String FLOW_STATUS_FINISH       = "1";//已完成
    public static final String FLOW_STATUS_DESTROY      = "2";//已废弃

    /**
     * 库房最大层级数
     */
    public static final Integer WAREHOUSE_LEVEL_MAX = 4;

    /*用户类型*/
    public static final String USER_TYPE_ADMIN  = "9";//管理员
    public static final String USER_TYPE_BZ     = "3";//部长
    public static final String USER_TYPE_ZG     = "2";//主管
    public static final String USER_TYPE_NORMAL = "1";//普通用户

    public static final String WAREHOUSE_TYPE_ZS = "1";//库房类-正式库
    public static final String WAREHOUSE_TYPE_LD = "1";//库房类-领导库
    public static final String WAREHOUSE_TYPE_YG = "1";//库房类-员工库
    public static final String WAREHOUSE_TYPE_QT = "1";//库房类-其它库

    public static final String ARCHIVES_STATUS_SAVE             = "0"; //保存
    public static final String ARCHIVES_STATUS_RECEIVE_SUBMITED = "1"; //提交未审核
    public static final String ARCHIVES_STATUS_RECEIVE_APPROVE  = "2"; //审核中
    public static final String ARCHIVES_STATUS_RECEIVE_WAIT     = "3"; //审核通过，等待入库
    public static final String ARCHIVES_STATUS_RECEIVE_REJECT   = "9"; //审核未通过
    public static final String ARCHIVES_STATUS_RK               = "10"; //入库
    public static final String ARCHIVES_STATUS_DESTROY_APPLY    = "31"; //申请销毁
    public static final String ARCHIVES_STATUS_DESTROY_APPROVE  = "32"; //销毁审批
    public static final String ARCHIVES_STATUS_DESTROY_WAIT     = "33"; //审批通过，等待确定
    public static final String ARCHIVES_STATUS_DESTROY_REJECT   = "39"; //销毁审批不通过
    public static final String ARCHIVES_STATUS_DESTROY          = "99"; //销毁

    public static final String BORROW_STATUS_APPLY          = "1";  //申请借阅
    public static final String BORROW_STATUS_APPROVE        = "2";  //借阅审批
    public static final String BORROW_STATUS_REJECT         = "9";  //审批不通过
    public static final String BORROW_STATUS_VIEW           = "10";  //审批通过
    public static final String BORROW_STATUS_BACK           = "11"; //申请归还
    public static final String BORROW_STATUS_FINISH         = "12"; //已归还，流程结束
    public static final String BORROW_STATUS_BACK_REJECT    = "19"; //归还审批不通过

    public static final String DELETED_NO = "0";
    public static final String DELETED_YES = "1";

    public static final String ARCHIVES_STAGE_RECEIVE = "receive";//接收阶段
    public static final String ARCHIVES_STAGE_DESTROY = "destroy";//销毁阶段

}
