package cn.stylefeng.workflow.design.modular.enums;

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

@Getter
public enum ModelExceptionEnum implements AbstractExceptionEnum {

    MODEL_NOT_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10001", "流程模型，查询结果不存在"),

    MODEL_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10002", "已经存在相同的模型编码"),

    DATA_ERROR(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10003", " 模型中流程定义的id不存在，数据错误"),

    USER_NOT_PERMISSION(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10004", "用户没有权限添加此模型为常用模型");

    private final String errorCode;

    private final String userTip;

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

}