package com.fs.qw.domain;

import lombok.Data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

@Data
public class QwMessageImage implements Serializable {
    private Long materialId; //素材id
    private Long receiverId; // 接收人用户id或接收群id
    private Boolean room; // 群消息标记
    private String fileId; // 从CDN上传图片接口获取的文件ID
    private String aesKey; // 从CDN上传图片接口获取的AES密钥
    private String md5; // 从CDN上传图片接口获取的MD5哈希值
    private Long fileSize; // 从CDN上传图片接口获取的文件大小
    private String deviceId;

    // 将对象转为Map
    public Map<String, Object> toMap() {
        Map<String, Object> map = new HashMap<>();
        map.put("receiverId", receiverId);
        map.put("room", room);
        map.put("fileId", fileId);
        map.put("aesKey", aesKey);
        map.put("md5", md5);
        map.put("fileSize", fileSize);
        return map;
    }
}
