package org.jeecg.modules.opencv.entity;

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 lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.util.Date;

/**
 * 模板合成视频
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2020-04-17
 */
@Data
@TableName("ctop_model_video_composite_info")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ctop_model_video_composite_info对象", description = "模板合成视频")
public class ModelVideoCompositeInfo {

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * videoUrl
     */
    @Excel(name = "videoUrl", width = 15)
    @ApiModelProperty(value = "videoUrl")
    private String videoUrl;
    /**
     * 模板id
     */
    @Excel(name = "模板id", width = 15)
    @ApiModelProperty(value = "模板id")
    private Long modelId;
    /**
     * userId
     */
    @Excel(name = "userId", width = 15)
    @ApiModelProperty(value = "userId")
    private String userId;
    /**
     * createTime
     */
    @ApiModelProperty(value = "createTime")
    private Date createTime;
    /**
     * updateTime
     */
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;

    private Integer sizeType;

    public ModelVideoCompositeInfo(String userId, ModelVideoInfo videoInfo, String finalUrl) {
        this.userId = userId;
        this.modelId = videoInfo.getId();
        this.videoUrl = finalUrl;
        this.sizeType = videoInfo.getSizeType();
        this.createTime = new Date();
        this.updateTime = new Date();
    }

    public ModelVideoCompositeInfo() {
    }
}
