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

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

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

@Data
public class CatalogItemSaveReqVO {

    @Schema(description = "条目ID，创建时为空，更新时必填")
    private Long id;

    @Schema(description = "工料机机类树节点ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull
    private Long categoryTreeId;

    @Schema(description = "编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank
    private String code;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank
    private String name;

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

    @Schema(description = "父路径（不含自身编码），如 ['RM','Concrete']")
    private List<String> parentPath;

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