package cn.reghao.tnb.message.api.model.resp;

import cn.reghao.tnb.message.api.model.EventType;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author reghao
 * @date 2022-04-21 11:05:56
 */

@Getter
@Setter
public class EventMessageResp <T> implements Serializable {
    private static final long serialVersionUID = 1L;

    private final String event;
    private final T content;

    public EventMessageResp(EventType eventType, T content) {
        this.event = eventType.name();
        this.content = content;
    }
}
