package com.upyuns.platform.rs.website.vo;


import cn.hutool.core.collection.CollUtil;
import com.github.wxiaoqi.security.common.vo.TreeNode;
import com.upyuns.platform.rs.website.entity.GainData;

import lombok.Data;

import java.util.List;

/**
 * Created by Ace on 2017/6/12.
 */
@Data
public class DataMenuTree extends TreeNode {
    String icon;
    String title;
    boolean spread = false;
    String component;
    String path;
    String code;
    String type;
    Integer dataNum;
    List<GainData> elements = CollUtil.newArrayList();

    String label;

    public DataMenuTree() {
    }

    public DataMenuTree(int id, String name, int parentId) {
        this.id = id;
        this.parentId = parentId;
        this.title = name;
        this.label = name;
    }
    public DataMenuTree(int id, String name, DataMenuTree parent) {
        this.id = id;
        this.parentId = parent.getId();
        this.title = name;
        this.label = name;
    }
}
