package com.yhy.module.core.controller.admin.infoprice.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.Map;

@Schema(description = "管理后台 - 信息价分类树创建/更新 Request VO")
@Data
public class InfoPriceCategoryTreeSaveReqVO {

    @Schema(description = "主键", example = "1")
    private Long id;

    @Schema(description = "信息价册ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "信息价册ID不能为空")
    private Long bookId;

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

    @Schema(description = "编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "CAT001")
    @NotBlank(message = "编码不能为空")
    private String code;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "土石方工程")
    @NotBlank(message = "名称不能为空")
    private String name;

    @Schema(description = "节点类型：1-目录 2-内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "节点类型不能为空")
    private Integer nodeType;

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

}
