package cn.stylefeng.team.meta.api.exception.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import cn.stylefeng.team.meta.api.constants.MetaConstants;
import lombok.Getter;

@Getter
public enum DatabaseMetadataExceptionEnum implements AbstractExceptionEnum {

    GEN_DATABASE_LINK_FAIL(RuleConstants.BUSINESS_ERROR_TYPE_CODE + MetaConstants.META_EXCEPTION_STEP_CODE + "31", "数据库链接失败"),

    GEN_DATABASE_TABLE_FAIL(RuleConstants.BUSINESS_ERROR_TYPE_CODE + MetaConstants.META_EXCEPTION_STEP_CODE + "32", "获取表数据失败"),

    GEN_DATABASE_FIELD_FAIL(RuleConstants.BUSINESS_ERROR_TYPE_CODE + MetaConstants.META_EXCEPTION_STEP_CODE + "33", "获取字段数据失败");

    private final String errorCode;

    private final String userTip;

    DatabaseMetadataExceptionEnum(String errorCode, String userTip) {
        this.errorCode = errorCode;
        this.userTip = userTip;
    }

}
