package com.yhy.module.core.controller.admin.workbench.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import java.math.BigDecimal;
import java.util.Map;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * 工作台市场主材设备保存 Request VO
 *
 * @author yhy
 */
@Schema(description = "工作台 - 市场主材设备保存 Request VO")
@Data
public class WbBoqMarketMaterialSaveReqVO {

    @Schema(description = "主键ID（更新时必填）", example = "1")
    private Long id;

    @Schema(description = "分部分项ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "分部分项ID不能为空")
    private Long divisionId;

    @Schema(description = "引用工料机ID", example = "1")
    private Long sourceResourceItemId;

    @Schema(description = "引用定额市场主材设备ID", example = "1")
    private Long sourceMarketMaterialId;

    @Schema(description = "资源类型", example = "material")
    private String resourceType;

    @Schema(description = "编码", example = "C001")
    private String code;

    @Schema(description = "名称", example = "水泥")
    private String name;

    @Schema(description = "规格型号", example = "P.O 42.5")
    private String spec;

    @Schema(description = "单位", example = "t")
    private String unit;

    @Schema(description = "消耗量", example = "1.5")
    private BigDecimal consumeQty;

    @Schema(description = "调整消耗量", example = "1.6")
    private BigDecimal adjustConsumeQty;

    @Schema(description = "税率", example = "0.13")
    private BigDecimal taxRate;

    @Schema(description = "除税基价", example = "450.00")
    private BigDecimal taxExclBasePrice;

    @Schema(description = "含税基价", example = "508.50")
    private BigDecimal taxInclBasePrice;

    @Schema(description = "除税编制价", example = "460.00")
    private BigDecimal taxExclCompilePrice;

    @Schema(description = "含税编制价", example = "519.80")
    private BigDecimal taxInclCompilePrice;

    @Schema(description = "调整系数", example = "1.0")
    private BigDecimal adjustRate;

    @Schema(description = "机类ID", example = "1")
    private Long categoryId;

    @Schema(description = "父工料机ID", example = "1")
    private Long parentId;

    @Schema(description = "来源类型", example = "system")
    private String sourceType;

    @Schema(description = "用量", example = "100")
    private BigDecimal usageQty;

    @Schema(description = "排序号", example = "1")
    private Integer sortOrder;

    @Schema(description = "扩展属性")
    private Map<String, Object> attributes;
}
