# ApiImportReportDTO.java

    package cloud.wconnect.finance.pojo.dto.api;

    import lombok.Data;
    import org.hibernate.validator.constraints.Length;
    import org.hibernate.validator.constraints.Range;
    import org.springframework.web.multipart.MultipartFile;

    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;

    /**
     * DTO: api导入报表
     *
     * @author zc
     * @date 2024/08/23
     */
    @Data
    public class ApiImportReportDTO {

        /**
         * 报表批次号
         */
        @NotBlank(message = "The batchNo cannot be empty")
        @Length(max = 20, message = "The batchNo cannot be longer than 20 characters")
        private String batchNo;

        /**
         * 数据源类型
         */
        @NotNull(message = "The type cannot be null")
        @Range(min = 1, max = 2, message = "The type must be in [1: API, 2: Other]")
        private Integer type;

        public static final int TYPE_API = 1;
        public static final int TYPE_OTHER = 2;

        /**
         * 报告文件
         */
        @NotNull(message = "The file cannot be null")
        private MultipartFile file;
    }