package com.zt.plat.module.contractorder.api.vo.contract;

import cn.hutool.json.JSONArray;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

@Schema(description = "管理后台 - 价款结算条款新增/修改 Request VO")
@Data
public class FormulaSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "22933")
    private Long id;

    @Schema(description = "合同主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9162")
    @NotNull(message = "合同主键不能为空")
    private Long contractId;

    @Schema(description = "公式类型;单价/总价/水扣款/加工费", example = "1")
    private String formulaType;

    @Schema(description = "公式")
    private String formulaCalculate;

    @Schema(description = "编码公式")
    private String numberFormula;

    @Schema(description = "物料名称", example = "赵六")
    private String materialName;

    @Schema(description = "物料编码")
    private String materialNumber;

    @Schema(description = "计算小数位")
    private Long decimalPoint;

    @Schema(description = "金属元素编码")
    private String elementNumber;

    @Schema(description = "金属元素缩写")
    private String elementAbbreviation;

    @Schema(description = "金属元素名称", example = "赵六")
    private String elementName;

    @Schema(description = "结算类型，多条使用逗号分隔（字典：PRCH_STLM_TP）", example = "1")
    private JSONArray settlementType;

    // 基础系数配置
    private List<CoefficientSaveReqVO> coefficients;
    // 品位等级价配置
    private List<GradeSaveReqVO> grades;
    // 调整价配置
    private List<DeductSaveReqVO> deducts;
    // 市场价配置
    private List<PriceSaveReqVO> prices;
}