package com.zcloud.dto;

import com.alibaba.fastjson.JSON;
import com.zcloud.entity.PageData;
import lombok.Data;

@Data
public class TenCorpDto {
    // 请秋id
    private String id;
    // 消息来源名称
    private String producer_name = "zcloud-other";
    private String topic;
    //印记(方便寻找该条请求)
    private String mark;
    // 标记名称
    private String mark_name;
    // 消息发送时间(yyyy-MM-dd HH:mm:ss:SSS)
    private String time_stamp;
    // 消息体
    // 八项作业根据这个区分接口
    private String message;
    // 消息体
    private PageData data;

    public TenCorpDto() {
        this.id = Warden.get32UUID();
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    public PageData getPd() {
        PageData info = new PageData();
        info.put("ID", this.id);
        info.put("PRODUCER_NAME", this.producer_name);
        info.put("MARK", this.mark);
        info.put("MARK_NAME", this.mark_name);
        info.put("MESSAGE", this.message);
        info.put("TOPIC",this.topic);
        return info;
    }
}
