package com.keyware.shandan.datasource.enums;

import lombok.Getter;

/**
 * 错误类型
 *
 * @author GuoXin
 * @since 2021/7/28
 */
@Getter
public enum ErrorType {
    OK(0, "成功"),
    DRIVER_SAVE_FAIL(1, "驱动保存失败"),
    DRIVER_VERIFY_FAIL(2, "驱动程序验证失败"),
    DB_CONN_FAIL(3, "数据库连接失败"),
    DB_DRIVER_NOT_FOUND(4, "数据库驱动未找到"),
    DB_DRIVER_LOAD_FAIL(5, "数据库驱动加载失败"),
    DRIVER_DONT_DEL(6, "驱动程序已被使用，无法删除"),
    DATASOURCE_INVALID(7, "数据源已失效"),
    OTHER(999, "服务器异常");

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

    private int code;
    private String msg;
}
