package com.cslg.ppa.common.core.auth;

public enum ResponseEnum {

    SUCCESS(200, "请求成功"),
    WEB_SOCKET_SUCCESS(2, "WebSocket请求成功"),
    BATCH_UPLOAD_INSTRUCTION_TASK_SUCCESS(900, "WebSocket请求成功"),
    PROJECT_IMPORT_TASK_SUCCESS(901, "WebSocket请求成功"),
    PROJECT_EXPORT_TASK_SUCCESS(902, "WebSocket请求成功"),
    PATENT_IMPORT_TASK_SUCCESS(903, "WebSocket请求成功"),
    PATENT_EXPORT_TASK_SUCCESS(904, "WebSocket请求成功"),
    UNAUTHORIZED(401, "未登录"),
    NOT_PERMISSION(402, "无操作权限"),
    FORBIDDEN(403, "拒绝访问"),
    USERNAME_ERROR(0, "用户名不存在"),
    PASSWORD_ERROR(0, "密码错误"),
    VERIFY_CODE_ERROR(0, "验证码错误"),
    QUERY_CACHE_ERROR(0, "专利检索缓存失效，请重试"),
    BATCH_UPLOAD_INSTRUCTION_TASK_ERROR(800, "导入说明书失败"),
    PROJECT_EXPORT_TASK_ERROR(802, "专题库数据导出失败"),
    PATENT_IMPORT_TASK_ERROR(803, "专利导入专利失败"),
    PATENT_EXPORT_TASK_ERROR(804, "专利导出专利失败"),
    SYSTEM_ERROR(500, "系统异常"),
    ERROR(0, "请求失败"),
    TENANT_STATUS_ERROR(805, "该用户的租户未启用"),
    PERSONNEL_STATUS_ERROR(806, "该用户未启用"),
    TENANT_DEADLINE_ERROR(0, "该用户的租户已过期"),
    THE_TOKEN_IS_INVALID(500, "token失效"),
    THE_REQUEST_TIME_OVERTIME(500, "请求时间超时"),
    THE_SIGN_IS_NOT_SAME(500, "请求SIGN不一致,重新检查"),
    THE_MACHINE_CODE_IS_NULL(500, "机器码不可为空"),
    DO_NOT_LOG_IN_TO_MORE_THAN_TWO_NEW_MACHINES_WITH_THE_SAME_ACCOUNT(500, "同一账号新机登录不可超过两个"),
    THE_PHONE_FORMAT_ERROR(500,"手机号格式错误"),
    THE_PHONE_IS_NOT_EMPTY(500,"手机号不可为空"),
    THE_PHONE_CODE_IS_INVALID(500,"手机验证码失效"),
    THE_PHONE_CODE_IS_NOT_NULL(500,"手机验证码不可为空"),
    THE_PHONE_CODE_IS_INCONFORMITY(500,"验证码不一致"),
    THE_PERSONNEL_IS_NOT_EXIST(500,"用户不存在"),
    THE_PERSONNEL_IS_FORBIDDEN(500,"该用户已停用"),
    THE_VERSION_IS_NULL(500, "版本号不可为空");


    private Integer code;
    private String message;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
