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

import cn.axzo.framework.rocketmq.Event;

/**
 * Flowable Event Enum For RocketMQ
 *
 * @author wangli
 * @since 2023/9/4 10:38
 */
public enum FlowableEventModuleEnum {
    PROCESS_CREATED("process", "process-created", "流程创建"),
    ;

    private final String module;

    private final String tag;

    private final String desc;

    private final Event.EventCode eventCode;

    FlowableEventModuleEnum(String module, String tag, String desc) {
        this.module = module;
        this.tag = tag;
        this.desc = desc;
        this.eventCode = Event.EventCode.builder()
                .module(module)
                .name(tag)
                .build();
    }

    public String getModule() {
        return module;
    }

    public String getTag() {
        return tag;
    }

    public String getDesc() {
        return desc;
    }

    public Event.EventCode getEventCode() {
        return eventCode;
    }
}
