package com.fs.qw.event;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.HashMap;
import java.util.Map;

@Data
@EqualsAndHashCode(callSuper = true)
public class EventMessageFile extends EventQwMessage {
    private String fileId;  // CDN文件ID
    private String aesKey;  // CDN文件的AES密钥
    private String md5;  // CDN文件的MD5摘要
    private Long fileSize;  // 文件大小，单位：字节
    private String fileName; // 文件名

    public Map<String, Object> toMap() {
        Map<String, Object> map = new HashMap<>();
        map.put("fileId", fileId);
        map.put("aesKey", aesKey);
        map.put("md5", md5);
        map.put("fileSize", fileSize);
        map.put("fileName", fileName);
        return map;
    }
}
