package org.dromara.inspection.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.format.DateTimeFormat;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.inspection.domain.ArStepMedia;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 步骤媒体文件视图对象 ar_step_media
 *
 * @author Lion Li
 * @date 2025-01-13
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = ArStepMedia.class)
public class ArStepMediaVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 媒体ID
     */
    @ExcelProperty(value = "媒体ID")
    private Long id;

    /**
     * 步骤记录ID
     */
    @ExcelProperty(value = "步骤记录ID")
    private Long stepRecordId;

    /**
     * 媒体类型
     */
    @ExcelProperty(value = "媒体类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "image=图片,video=视频,audio=音频")
    private String mediaType;

    /**
     * 文件URL
     */
    @ExcelProperty(value = "文件URL")
    private String fileUrl;

    /**
     * 文件名称
     */
    @ExcelProperty(value = "文件名称")
    private String fileName;

    /**
     * 文件大小(字节)
     */
    @ExcelProperty(value = "文件大小(字节)")
    private Long fileSize;

    /**
     * 上传时间
     */
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "上传时间")
    private Date uploadTime;

    /**
     * 创建时间
     */
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "创建时间")
    private Date createTime;

}
