package com.usoftchina.bi.core.base;

public enum  RepCode {
    success(200,"成功"),
    warn(-1,"请求失败，请重新尝试连接"),
    Null(100,"数据为空"),
    nullAxis(-101,"x轴或y轴为空"),
    erro(-110,"参数错误"),
    nullTableName(-120,"表名为空"),
    hasChartsUsing(-130, "图表正在使用"),
    hasGroupUsing(-140, "存在子分组"),
    hasConUsing(-150, "分组正在被数据源使用"),
    hasChartUsing(-160, "分组正在被图表使用"),
    ChartsNameNull(-170, "表不存在"),
    NoUser(-180, "用户名或密码错误"),
    NoAuthority(-503, "无此权限"),
    ToMach(1, "数据过大"),
    UserIn(-504, "用户已存在"),
    DashboardNotExist(-505, "编号为%s的看板不存在"),
    SqlWarn(-506, "只能使用查询语句"),
    DataSourceNull(-507, "数据源切换失败"),
    ChartNonExistent(-508, "图表不存在"),
    DataNonExistent(-509, "数据源不存在"),
    DashboardNonExistent(-510, "看板不存在"),
    DATACONNECTOR_USED_DATASOURCE(-511, "已有数据源使用了此连接,无法删除!"),
    CHARTS_USED_DATACONNECTOR(-512, "该数据源存在关联的图表，不允许删除!"),
    DASHBOARD_USED_CHARTS(-513, "该图表存在关联的报表，不允许删除!"),
    MENU_USED_DASHBOARD(-514, "此目录下存在报表,无法删除!"),
    USER_GROUP_EXISTS(-515, "用户组名称已存在!");

    private int code;
    private String msg;

    RepCode(int code , String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
