package org.jeecg.modules.minio.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

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

/**
 * @author WangPeng
 * @date 2022/12/5 17:39
 * @description
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@ApiModel(value = "上传文件需要用的基本参数")
public class UploadFileParamDTO {

    /**
     * 当前文件的分片对象
     */
    @ApiModelProperty(value = "当前文件的对象", required = true)
    @NotNull(message = "当前文件的对象不能为空")
    private MultipartFile file;

    /**
     * 文件存储位置前缀 存储文件时将创建指定目录
     */
    @ApiModelProperty(value = "文件存储位置前缀", required = true, example = "test/xxx")
    @NotBlank(message = "文件存储位置前缀不能为空")
    private String biz;
}
