package com.nanri.aiimage.modules.split.model.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "数据拆分执行请求")
public class SplitRunRequest {

    @Valid
    @NotEmpty(message = "请先上传待拆分文件")
    @Schema(description = "已上传源文件列表")
    private List<SplitSourceFileDto> files;

    @NotEmpty(message = "请至少选择一列")
    @Schema(description = "保留列")
    private List<String> selectedColumns;

    @NotBlank(message = "拆分模式不能为空")
    @Schema(description = "拆分模式：rows_per_file / parts")
    private String splitMode;

    @Schema(description = "按每份条数拆分时的条数")
    private Integer rowsPerFile;

    @Schema(description = "按份数拆分时的份数")
    private Integer parts;

    @Schema(description = "文件夹上传场景下的总压缩包名称（不含扩展名）")
    private String archiveName;

    @NotNull(message = "user_id 不能为空")
    @JsonProperty("user_id")
    @Schema(description = "当前登录用户 ID")
    private Long userId;
}
