package cn.stylefeng.team.meta.modular.enums;

import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.exception.AbstractExceptionEnum;
import lombok.Getter;

@Getter
public enum MetaFieldExceptionEnum implements AbstractExceptionEnum {

    META_FIELD_NOT_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10001", "查询结果不存在"),

    IMPORT_FAIL_FOR_EXIST_NULL_FIELD(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10002", "导入失败，存在字段为空的表"),

    IMPORT_FAIL_FOR_NOT_EXIST_PRIMARY_KEY(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10003", "导入失败，表中不存在主键，后续使用会有问题，表名：{}"),

    REPEAT_FIELD(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10004", "以下字段存在重复，字段如下：{}");

    private final String errorCode;

    private final String userTip;

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

}