package com.securitycontrol.entity.system.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author：cwchen
 * @date：2024-02-22-9:31
 * @version：1.0
 * @description：下拉树-vo
 */
@Data
public class TreeNode {

    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "名称")
    private String label;

    @ApiModelProperty(value = "父ID")
    private String parentId;

    @ApiModelProperty(value = "层级")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String level;

    @ApiModelProperty(value = "是否禁用")
    @JsonProperty("isDisabled")
    private boolean isDisabled = false;

    @ApiModelProperty(value = "子节点")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TreeNode> children = new ArrayList<>();
}
