package cn.axzo.workflow.common.enums;

import cn.axzo.framework.rocketmq.Event;

/**
 * 流程实例相关的 MQ 事件枚举定义
 *
 * @author wangli
 * @since 2023/9/25 11:47
 */
public enum ElasticSearchEventEnum {

    ELASTIC_SEARCH_SYNC("elastic-search", "elastic-search-sync", "同步实例数据到ES"),
    ;
    private final String module;
    private final String tag;
    private final String desc;
    private Event.EventCode eventCode;

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

    public String getModule() {
        return module;
    }

    public String getTag() {
        return tag;
    }

    public String getDesc() {
        return desc;
    }

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