package com.zt.plat.module.erp.controller.admin.erp.vo;


import com.baomidou.mybatisplus.annotation.TableField;
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 ErpMaterialCorrSaveReqVO {
    /**
     * 主键
     */
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "2038")
    private Long id;

    /**
     * 拓展关系主物料
     */
    @Schema(description = "拓展关系主物料", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "拓展关系主物料不能为空")
    private Long materialParentId;

    /**
     * 拓展关系主物料编号
     */
    @Schema(description = "拓展关系主物料编号")
    private String materialParentCode;
    /**
     * 公司编码
     */
    @Schema(description = "公司编码")
    private String companyCode;

    /**
     * 部门ID
     */
    @Schema(description = "部门ID")
    private Long deptId;
    /**
     * 部门编码
     */
    @Schema(description = "部门编码")
    private String deptCode;
    /**
     * 拓展关系物料
     */
    @Schema(description = "拓展关系物料")
    private List<Materials> materials;

    @Data
    @Schema(description = "拓展关系物料")
    public static class Materials {
        @Schema(description = "物料ID", requiredMode = Schema.RequiredMode.REQUIRED)
        private Long materialId;
        @Schema(description = "物料编码")
        private String materialCode;
    }
}


