package com.hfkj.model;

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

public class UserTreeModel {

	private String title;

	private String key;

	private String phone;

	//节点类型 flase:组织架构；true:用户
	private Boolean type;

	private List<UserTreeModel> children;

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public Boolean getType() {
		return type;
	}

	public void setType(Boolean type) {
		this.type = type;
	}

	public List<UserTreeModel> getChildren() {
		return children;
	}

	public void setChildren(List<UserTreeModel> children) {
		this.children = children;
	}

	/**
	 * 添加子节点.
	 * @param child
	 */
	public void add(UserTreeModel child) {
		if (children == null) {
			children = new ArrayList<>();
		}
		children.add(child);
	}

}
