package com.zt.plat.module.contractorder.controller.admin.salesorder.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.*;

import jakarta.validation.constraints.*;

import java.math.BigDecimal;

@Schema(description = "管理后台 - 销售订单明细新增/修改 Request VO")
@Data
public class SalesOrderDetailSaveReqVO {

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

    @Schema(description = "订单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "9072")
    @NotEmpty(message = "订单主键不能为空")
    private String orderId;

    @Schema(description = "行项目;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "行项目;推送ERP(必须)不能为空")
    private Long lineNumber;

    @Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @NotEmpty(message = "物料名称不能为空")
    private String materialName;

    @Schema(description = "物料编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "物料编码;推送ERP(必须)不能为空")
    private String materialNumber;

    @Schema(description = "工厂名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @NotEmpty(message = "工厂名称不能为空")
    private String factoryName;

    @Schema(description = "工厂编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "工厂编码;推送ERP(必须)不能为空")
    private String factoryNumber;

    @Schema(description = "库位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @NotEmpty(message = "库位名称不能为空")
    private String warehouseName;

    @Schema(description = "库位编码;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "库位编码;推送ERP(必须)不能为空")
    private String warehouseNumber;

    @Schema(description = "计量单位;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "计量单位;推送ERP(必须)不能为空")
    private String unt;

    @Schema(description = "开票类型;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotEmpty(message = "开票类型;推送ERP(必须)不能为空")
    private String invoiceType;

    @Schema(description = "暂估数量;推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "暂估数量;推送ERP(必须)不能为空")
    private BigDecimal quantity;

    @Schema(description = "稅分类(字典:SALE_TAX);推送ERP(必须)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "稅分类(字典:SALE_TAX);推送ERP(必须)不能为空")
    private String taxAcctasscat;

    @Schema(description = "项目类别;推送ERP")
    private String projectCategory;

    @Schema(description = "装运地点;推送ERP")
    @NotEmpty(message = "装运地点;推送ERP不能为空")
    private String shippingPlace;

    @Schema(description = "物料科目分配组;推送ERP（必须）")
    private String metalAcctasscatGroup;

    @Schema(description = "小协议号")
    private String agreementNumber;

    @Schema(description = "总价")
    private BigDecimal gross;

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

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

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

    @Schema(description = "是否启用;处理明细中多个相同物料，只能允许一种物料启用", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "是否启用;处理明细中多个相同物料，只能允许一种物料启用不能为空")
    private String isEnable;

    @Schema(description = "价格条件详情;推送ERP(必须):JSON", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "价格条件详情;推送ERP(必须):JSON不能为空")
    private String priceConditionDetail;

    @Schema(description = "来料加工原料详情;推送ERP:订单类型(JSON)")
    private String originDetail;

    @Schema(description = "税率")
    private String taxRte;

    @Schema(description = "备注")
    private String remark;
    @Schema(description = "含税单价")
    private BigDecimal inTaxUnitPrice;
}
