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

import io.swagger.v3.oas.annotations.media.Schema;
import java.util.Map;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import lombok.Data;

/**
 * 项目界面配置树 创建/更新 Request VO
 */
@Schema(description = "管理后台 - 项目界面配置树创建/更新 Request VO")
@Data
public class ConfigProjectTreeSaveReqVO {

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

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

    @Schema(description = "编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "GD")
    @NotBlank(message = "编码不能为空")
    @Size(max = 50, message = "编码长度不能超过50个字符")
    private String code;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "广东")
    @NotBlank(message = "名称不能为空")
    @Size(max = 200, message = "名称长度不能超过200个字符")
    private String name;

    @Schema(description = "节点类型：root-根节点, province-省市, industry-行业", requiredMode = Schema.RequiredMode.REQUIRED, example = "province")
    @NotBlank(message = "节点类型不能为空")
    private String nodeType;

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

    // 验证分组
    public interface CreateGroup {}
    public interface UpdateGroup {}
}
