package com.skr.mdm.bean.qo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 文件分片
 *
 * @Author nfq
 * @Date 2022/11/24 10:35
 **/
@Data
@ApiModel(value = "文件分片QO")
public class FileChunkQO {

    @NotBlank(message = "文件标识不能为空")
    @ApiModelProperty(value = "文件标识（md5值）")
    private String identifier;

//    @NotNull(message = "文件不能为空")
//    @ApiModelProperty(value = "分块文件")
//    private MultipartFile file;

    @NotNull(message = "当前分块序号不能为空")
    @ApiModelProperty(value = "当前分块序号")
    private Integer chunkNum;

    @ApiModelProperty(value = "分块大小", hidden = true)
    private Integer chunkSize;

    @ApiModelProperty(value = "当前分块大小", hidden = true)
    private Integer currentChunkSize;

    @NotNull(message = "当前分块序号不能为空")
    @ApiModelProperty(value = "文件总大小")
    private Integer totalSize;

    @NotNull(message = "分块总数不能为空")
    @ApiModelProperty(value = "分块总数")
    private Integer totalChunks;

    @NotBlank(message = "文件名不能为空")
    @ApiModelProperty(value = "文件名")
    private String fileName;

}
