package com.youlai.boot.system.model.entity;

import lombok.Data;
import lombok.ToString;

import java.awt.font.TextHitInfo;
import java.util.ArrayList;
import java.util.List;
@Data
public class DirectoryNode {
    String label;
    String absolutePath;
    int id;
    int parentId;
    List<DirectoryNode> children;

    public DirectoryNode() {

    }

    public DirectoryNode(String label,String absolutePath, int id, int parentId) {
        this.label = label;
        this.absolutePath = absolutePath;
        this.id = id;
        this.parentId = parentId;
        this.children = new ArrayList<DirectoryNode>();
    }

    public void addChild(DirectoryNode child) {
        this.children.add(child);
    }
    @Override
    public String toString() {
        return label;
    }

}
