package com.sonic.pigeon.event.inner;

import com.sonic.pigeon.config.EventConfig;
import com.sonic.common.event.Event;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 定义当前系统的消息
 * @author coder
 */
@AllArgsConstructor
@Getter
public enum EventType {
    /** 事件定义 */
    DEMO_CREATED(EventConfig.DEFAULT_SCENE, EventConfig.PIGEON, "demo_created", "demo 创建"),

    ;

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

    private String desc;
    private Event.EventCode eventCode;
}
