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 EventMessageVideo extends EventQwMessage {

    private String videoFileId; // 视频CDN参数：文件ID
    private String videoAesKey; // 视频CDN参数：AES密钥
    private String videoMd5; // 视频CDN参数：MD5值
    private Long videoFileSize; // 视频CDN参数：文件大小
    private Integer width; // 视频宽度
    private Integer height; // 视频高度
    private Integer duration; // 视频时长，单位：秒
    private String thumbnailFileId; // 缩略图CDN参数：文件ID
    private String thumbnailAesKey; // 缩略图CDN参数：AES密钥
    private String thumbnailMd5; // 缩略图CDN参数：MD5值
    private Long thumbnailFileSize; // 缩略图CDN参数：文件大小

    public Map<String, Object> toMap() {
        Map<String, Object> map = new HashMap<>();
        map.put("videoFileId", videoFileId);
        map.put("videoAesKey", videoAesKey);
        map.put("videoMd5", videoMd5);
        map.put("videoFileSize", videoFileSize);
        map.put("width", width);
        map.put("height", height);
        map.put("duration", duration);
        map.put("thumbnailFileId", thumbnailFileId);
        map.put("thumbnailAesKey", thumbnailAesKey);
        map.put("thumbnailMd5", thumbnailMd5);
        map.put("thumbnailFileSize", thumbnailFileSize);
        return map;
    }
}
