package com.ruoyi.common.websocket.dto;

import cn.hutool.json.JSONUtil;
import lombok.Data;

@Data
public class MessageDo {
    private String title;
    private String content;

    public MessageDo(String title, String content) {
        this.title = title;
        this.content = content;
    }

    public static String getMessageDo(String title, String content) {
        MessageDo messageDo = new MessageDo(title, content);
        return JSONUtil.toJsonStr(messageDo);
    }
}
