package com.njcn.common.pojo.enums.response;

import lombok.Getter;

/**
 * @author hongawen
 * @version 1.0.0
 * @date 2021年04月13日 10:33
 */
@Getter
public enum CommonResponseEnum {

    /**
     * A0000 ~ A0099 作用于通用业务枚举
     * 通用业务的响应枚举
     */
    SUCCESS("A0000", "成功"),

    NO_DATA("A0001", "数据为空"),

    FAIL("A0002", "失败"),

    INTERNAL_ERROR("A0003", "系统内部异常"),

    SERVICE_FALLBACK("A0004", "服务访问降级"),

    INVALID_PARAMETER("A0005", "请求参数非法"),

    INVALID_MEDIA("A0006", "请求参数媒体不支持"),

    ENUM_ERROR("A0007", "枚举解析异常"),

    NULL_POINTER_EXCEPTION("A0008", "空指针异常"),

    ARITHMETIC_EXCEPTION("A0009", "算数运算异常"),

    CLASS_CAST_EXCEPTION("A0010", "类型转换异常"),

    INDEX_OUT_OF_BOUNDS_EXCEPTION("A0011", "索引下标越界异常"),

    HTTP_MEDIA_TYPE_NOT_SUPPORTED_EXCEPTION("A0012", "请求中参数的媒体方式不支持"),

    METHOD_ARGUMENT_NOT_VALID_EXCEPTION("A0013", "参数校验异常"),

    ILLEGAL_ARGUMENT_EXCEPTION("A0014", "参数校验异常"),

    SM2_CIPHER_ERROR("A0015", "SM2获取秘钥对异常"),

    UN_DECLARE("A0016", "后台接口异常"),

    DIC_DATA("A0017", "获取字典数据失败"),

    GET_MQTT_CLIENT_FAIL("A0018", "获取MQTT客户端失败"),

    NO_MQTT_HANDLER("A0019", "MQTT中没有处理器Handler"),

    NO_MQTT_PRODUCER("A0020", "MQTT没有生产者producer"),

    JSON_CONVERT_EXCEPTION("A0021", "JSON转换异常"),

    TOKEN_EXPIRE_JWT("A0024", "token已过期"),

    PARSE_TOKEN_ERROR("A0025", "token解析异常"),

    REFLECT_METHOD_EXCEPTION("A0026", "反射方法获取属性值异常"),

    REQUEST_EMPTY("A0027", "当前请求web环境为空"),

    EXPORT_FILE_ERROR("A0051","数据完整报表下载异常"),

    PREPARE_RESPONSE_ENUM("A0089", "预处理响应枚举类型"),

    USER_RESPONSE_ENUM("A0090", "用户响应枚举类型"),

    GATEWAY_RESPONSE_ENUM("A0091", "网关响应枚举类型"),

    DEVICE_RESPONSE_ENUM("A0092", "终端响应枚举类型"),

    SYSTEM_RESPONSE_ENUM("A0093", "系统响应枚举类型"),

    DELETE_PID_EXIST("A0094", "存在子节点"),

    DELETE_PID_UNEXIST("A0095", "不存在子节点"),

    FILE_EXIST("A0096", "文件已存在"),

    FILE_NAME_ERROR("A0096", "文件格式有误"),

    FILE_SIZE_ERROR("A0096", "文件过大"),

    FILE_XLSX_ERROR("A0096", "请上传excel文件"),

    DEPT_EXIST("A0097", "部门id已存在"),

    DEPT_NOT_EXIST("A0098", "部门id不存在"),

    DEPT_BINDED("A0099", "部门id已绑定"),

    ID_NOT_EXIST("A0100", "id不存在"),

    TIME_ERROR("A0101","时间格式有误"),
    CLOSE_RESOURCE_ERROR("A0102","关闭资源有误"),
    MATH_ERROR("A0103","比例总和大于100%"),
    CS_DEVICE_RESPONSE_ENUM("A0104", "治理终端响应枚举类型"),

    ADVANCE_RESPONSE_ENUM("A00105", "终端响应枚举类型"),

    DYNAMIC_RESPONSE_ENUM("A00002", "动态枚举内容"),


    ;

    private final String code;

    private String message;

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

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