package cn.axzo.workflow.core.common.code;

import cn.axzo.framework.domain.web.code.IModuleRespCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * BPMN 协议转换异常
 *
 * @author wangli
 * @since 2023/12/14 16:25
 */
@Getter
@AllArgsConstructor
public enum ConvertorRespCode implements IModuleRespCode {
    CONVERTOR_UNKNOW_NODE_TYPE("001", "节点类型【{}】暂不支持"),
    CONVERTOR_META_DATA_FORMAT_ERROR("002", "JSON 数据格式有误-{}: {}"),
    CONVERTOR_COMMON_ERROR("003", "JSON 转 BPMN 失败, 原因:【{}】"),
    CONVERTOR_NODE_TYPE_NOT_SUPPORT("004", "【{}】节点类型, ID:【{}】暂不支持"),
    CONVERTOR_OPERATION_STRING_TYPE_ERROR("005", "条件节点(字符串)运算符【{}】暂不支持"),
    CONVERTOR_OPERATION_NUMBER_TYPE_ERROR("006", "条件节点(数字)运算符【{}】暂不支持"),
    CONVERTOR_OPERATION_RADIO_TYPE_ERROR("007", "条件节点(单选)运算符【{}】暂不支持"),
    CONVERTOR_OPERATION_CHECKBOX_TYPE_ERROR("008", "条件节点(复选)运算符【{}】暂不支持"),
    ;

    private String code;
    private String message;

    @Override
    public String getModuleCode() {
        return "02";
    }

    @Override
    public String getProjectCode() {
        return "998";
    }

    public void setCode(String code) {
        this.code = code;
    }


    public void setMessage(String message) {
        this.message = message;
    }

}
