package cn.axzo.workflow.common.enums;

import cn.axzo.framework.rocketmq.Event;

/**
 * 流程活动节点相关的 MQ 事件枚举定义
 *
 * @author wangli
 * @since 2023/11/21 17:24
 */
public enum ProcessActivityEventEnum {

    PROCESS_ACTIVITY_START("process-activity", "process-activity-start", "流程活动节点已开始"),
    PROCESS_ACTIVITY_WAIT_ASSIGNEE("process-activity", "process-activity-wait-assignee", "流程活动节点等待指定审批人"),
    PROCESS_ACTIVITY_TAKE("process-activity", "process-activity-take", "该事件类型暂时不存在"),
    PROCESS_ACTIVITY_END("process-activity", "process-activity-end", "流程活动节点已取消"),
    ;

    private final String module;
    private final String tag;
    private final String desc;
    private Event.EventCode eventCode;

    ProcessActivityEventEnum(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;
    }
}
