package com.bonus.sgzb.material.config;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 返回异常枚举类
 * @Author ma_sh
 * @create 2024/3/29 14:43
 */
@Getter
@AllArgsConstructor
public enum ExceptionEnum {

    PARAM_NULL(1001, "参数为空"),
    IOT_CODE_DUPLICATE(1002, "设备编号重复"),
    IOT_TO_DELETE(1003, "该iot设备绑定相关类型设备，无法删除"),
    SUCCESS(200, "操作成功"),
    SAVE_TO_DATABASE(500, "新增保存失败，请联系管理员！！！"),
    DELETE_TO_DATABASE(500, "删除失败，请联系管理员！！！"),
    BIND_TO_DATABASE(500, "绑定失败，请联系管理员！！！"),
    UN_BIND_TO_DATABASE(500, "解绑失败，请联系管理员！！！"),
    UPDATE_TO_DATABASE(500, "修改失败，请联系管理员！！！"),

    RETURN_DATA_IS_EMPTY(501, "返回数据为空！！"),
    IOT_ENCODING_ERROR(502, "输入的IOT编码有误，请输入正确的编码！！！");

    private Integer code;

    private String msg;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
