package com.cmvr.inspection.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 巡检结果关联的图片或视频证据。
 *
 * <p>媒体内容保存在MinIO，本表只保存永久访问地址，不保存文件字节。</p>
 */
@Data
@TableName("inspection_result_media")
@ApiModel(value = "InspectionResultMedia", description = "巡检结果关联的图片或视频证据")
public class InspectionResultMedia implements Serializable
{
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty("媒体记录主键")
    private String id;

    @ApiModelProperty("关联巡检结果ID")
    private String resultId;

    @ApiModelProperty(value = "媒体类型", allowableValues = "IMAGE,VIDEO", example = "IMAGE")
    private String mediaType;

    @ApiModelProperty("MinIO永久媒体地址")
    private String mediaUrl;

    @ApiModelProperty(value = "同一巡检结果内的展示顺序", example = "0")
    private Integer sortOrder;

    @ApiModelProperty("记录创建时间")
    private Date createTime;
}
