package com.zt.plat.module.base.controller.admin.unitConversion.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;

import java.math.BigDecimal;
import java.util.List;

@Schema(description = "管理后台 - 批量按符号单位转换 Request VO")
@Data
public class BatchUnitConvertBySymbolReqVO {

    @Schema(description = "源单位符号", requiredMode = Schema.RequiredMode.REQUIRED, example = "m")
    @NotBlank(message = "源单位符号不能为空")
    private String srcUnitSymbol;

    @Schema(description = "目标单位符号", requiredMode = Schema.RequiredMode.REQUIRED, example = "km")
    @NotBlank(message = "目标单位符号不能为空")
    private String tgtUnitSymbol;

    @Schema(description = "待转换的值列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "待转换的值列表不能为空")
    private List<BigDecimal> values;

    @Schema(description = "精度(小数位数)", example = "6")
    private Integer precision = 6;

    @Schema(description = "是否忽略错误(true:遇到错误继续执行, false:遇到错误立即停止)", example = "false")
    private Boolean ignoreErrors = false;
}
