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 java.util.Map;

@Schema(description = "工料机机类树保存请求")
@Data
public class ResourceCategoryTreeSaveReqVO {

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

    @Schema(description = "父节点ID", example = "1")
    private Long parentId;

    @Schema(description = "节点编码", required = true, example = "GD-GMJ")
    @NotBlank(message = "节点编码不能为空")
    private String code;

    @Schema(description = "节点名称", required = true, example = "广东工民建工料机")
    @NotBlank(message = "节点名称不能为空")
    private String name;

    @Schema(description = "节点类型（region=地区, specialty=工料机专业）", requiredMode = Schema.RequiredMode.REQUIRED, example = "specialty")
    @NotBlank(message = "节点类型不能为空")
    private String nodeType;

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

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