package com.stdproject.common;

/**
 * 系统常量类
 *
 * @author StdProject
 */
public class Constants {

    /**
     * JWT相关常量
     */
    public static final String JWT_HEADER = "Authorization";
    public static final String JWT_PREFIX = "Bearer ";
    public static final String JWT_SECRET_KEY = "jwt.secret";
    public static final String JWT_EXPIRATION_KEY = "jwt.expiration";

    /**
     * 用户状态
     */
    public static final String USER_STATUS_NORMAL = "0"; // 正常
    public static final String USER_STATUS_DISABLED = "1"; // 停用
    public static final String USER_STATUS_LOCKED = "2"; // 锁定

    /**
     * 角色状态
     */
    public static final String ROLE_STATUS_NORMAL = "0"; // 正常
    public static final String ROLE_STATUS_DISABLED = "1"; // 停用

    /**
     * 菜单类型
     */
    public static final String MENU_TYPE_DIRECTORY = "M"; // 目录
    public static final String MENU_TYPE_MENU = "C"; // 菜单
    public static final String MENU_TYPE_BUTTON = "F"; // 按钮

    /**
     * 菜单状态
     */
    public static final String MENU_STATUS_NORMAL = "0"; // 正常
    public static final String MENU_STATUS_DISABLED = "1"; // 停用

    /**
     * 组织状态
     */
    public static final String ORG_STATUS_NORMAL = "0"; // 正常
    public static final String ORG_STATUS_DISABLED = "1"; // 停用

    /**
     * 操作类型
     */
    public static final String OPT_TYPE_LOGIN = "00"; // 登录
    public static final String OPT_TYPE_INSERT = "01"; // 新增
    public static final String OPT_TYPE_UPDATE = "02"; // 修改
    public static final String OPT_TYPE_DELETE = "03"; // 删除
    public static final String OPT_TYPE_QUERY = "06"; // 查询
    public static final String OPT_TYPE_OTHER = "09"; // 其他

    /**
     * 操作状态
     */
    public static final String OPT_STATUS_SUCCESS = "0"; // 成功
    public static final String OPT_STATUS_FAIL = "1"; // 失败

    /**
     * 数据权限类型
     */
    public static final String DATA_SCOPE_ALL = "1"; // 全部数据权限
    public static final String DATA_SCOPE_CUSTOM = "2"; // 自定义数据权限
    public static final String DATA_SCOPE_DEPT = "3"; // 部门数据权限
    public static final String DATA_SCOPE_DEPT_AND_CHILD = "4"; // 部门及以下数据权限
    public static final String DATA_SCOPE_SELF = "5"; // 仅本人数据权限

    /**
     * 字典状态
     */
    public static final String DICT_STATUS_NORMAL = "0"; // 正常
    public static final String DICT_STATUS_DISABLED = "1"; // 停用

    /**
     * 是否删除
     */
    public static final String DELETED_YES = "1"; // 已删除
    public static final String DELETED_NO = "0"; // 未删除

    /**
     * 性别
     */
    public static final String GENDER_MALE = "0"; // 男
    public static final String GENDER_FEMALE = "1"; // 女
    public static final String GENDER_UNKNOWN = "2"; // 未知

    /**
     * 默认密码
     */
    public static final String DEFAULT_PASSWORD = "123456";

    /**
     * 超级管理员角色编码
     */
    public static final String SUPER_ADMIN_ROLE = "admin";

    /**
     * 根节点ID
     */
    public static final Long ROOT_NODE_ID = 0L;

    /**
     * 缓存过期时间（秒）
     */
    public static final int CACHE_EXPIRE_TIME = 3600; // 1小时
    public static final int CACHE_EXPIRE_TIME_SHORT = 300; // 5分钟
    public static final int CACHE_EXPIRE_TIME_LONG = 86400; // 24小时

    /**
     * 分页默认值
     */
    public static final int DEFAULT_PAGE_SIZE = 20;
    public static final int MAX_PAGE_SIZE = 500;
}