package com.sjyt.icom.asst.common.model.message;

import com.sjyt.icom.asst.common.annotation.JsonRequired;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.SuperBuilder;
import lombok.experimental.Tolerate;

import java.util.Map;

/**
 * 消息
 *
 * @author renyanru
 * @version V1.0.0
 * @date 2022/5/27 14:38
 */
@Data
@Builder(toBuilder = true)
public class Message {
  /** 消息hash */
  private String hash;
  /** 消息体编码 */
  @JsonRequired private String cmd;
  /** 标题 */
  private String title;
  /** 额外信息 */
  private String extra;
  /** 消息内容 */
  private Map<String, Object> body;
  /** 时间戳 */
  private String timestamp;
  @Tolerate
  public Message() {
  }
}
