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

import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import lombok.Data;

@Schema(description = "管理后台 - 定额子目树 Response VO")
@Data
public class QuotaCatalogTreeRespVO {

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

    @Schema(description = "租户ID", example = "1")
    private Long tenantId;

    @Schema(description = "关联定额专业节点ID", example = "1")
    private Long catalogItemId;

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

    @Schema(description = "编码", example = "01")
    private String code;

    @Schema(description = "名称", example = "土石方工程")
    private String name;

    @Schema(description = "单位", example = "m²")
    private String unit;

    @Schema(description = "内容类型：directory-目录，content-内容", example = "directory")
    private String contentType;

    @Schema(description = "是否允许添加子节点", example = "true")
    private Boolean allowChildren;

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

    @Schema(description = "树路径")
    private String[] path;

    @Schema(description = "层级", example = "1")
    private Integer level;

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

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "已被绑定的字段索引列表（用于前端禁用）", example = "[1, 2, 3]")
    private List<Integer> boundFieldIndexes;

    @Schema(description = "子节点列表")
    private List<QuotaCatalogTreeRespVO> children;
}
