package com.ga.common.model;

import lombok.Data;

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

/**
 * 트리 응답 공통 모델 (메뉴, 조직 등).
 */
@Data
public class TreeNode<T> {
    private Long id;
    private Long parentId;
    private String label;
    private T data;
    private List<TreeNode<T>> children = new ArrayList<>();

    public void addChild(TreeNode<T> child) {
        children.add(child);
    }
}
