package com.njcn.process.enums;

import lombok.Getter;

/**
 * 异常处理类
 * @author qijian
 * @version 1.0.0
 * @date 2022年11月11日 09:56
 */
@Getter
public enum ProcessResponseEnum {

    /**
     * 过程监督异常响应码的范围：
     * A00550 ~ A00649
     */
    PROCESS_COMMON_ERROR("A00550","监督管理模块异常"),
    ARCHIVE_ERROR("A00552","不满足归档调节，操作失败！"),
    PROCESS_ERROR("A00553","当前流程未审核通过，操作失败！"),
    QUERY_IS_EMPTY("A00554","当前未查询到当前策略信息，无法删除!"),
    ENABLED_CANNOT_BE_DELETED("A00555","策略为启用状态不能删除!"),
    THERE_IS_ONLY_ONE_STRATEGY("A00556","各个策略等级，通用策略只能有一条!"),
    TERMINAL_ID_REPEAT("A00351","终端编号已存在"),
    NO_PERMISSION("A00357","当前登录人无权限此项操作"),

    SUPV_PLAN_REPEAT("A00568","监督计划名称已存在"),
    NO_UPDATE("A00568","该申请单非新建，驳回状态不准许更新"),
    REPEAT_NAME_CATEGORY("A00568","流程表单名称重复"),
    REPEAT_CODE_CATEGORY("A00568","流程表单编号重复"),

    FORM_NOT_EXIST("A00568","流程表单不存在"),

    MODEL_NO_EXIST("A00568","流程模型不存在"),

    NO_MODEL_XML("A00568","未获取到流程模型设计"),

    NO_XML("A00568","请先设计流程图"),

    NO_STARTER_MODEL_XML("A00568","开始节点不存在，请检查流程设计是否有误"),

    MODEL_HAS_NO_FORM("A00568","请配置流程表单"),

    LATEST_VERSION("A00568","当前版本已是最新版!"),

    PROCESS_DATASOURCE_MISS("A00568","数据源没找到!"),
    ;

    private final String code;

    private final String message;

    ProcessResponseEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
