package com.zt.plat.module.api.dto.unitconversion;

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

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

/**
 * 批量按名称单位转换请求 DTO
 * 用于Feign远程调用
 *
 * @author ZT
 */
@Schema(description = "RPC 服务 - 批量按名称单位转换 Request DTO")
@Data
public class BatchUnitConvertByNameReqDTO {

    @Schema(description = "源单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "千克")
    @NotBlank(message = "源单位名称不能为空")
    private String srcUnitName;

    @Schema(description = "目标单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "吨")
    @NotBlank(message = "目标单位名称不能为空")
    private String tgtUnitName;

    @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;
}
