package com.mindskip.xzs.vo; import com.baomidou.mybatisplus.annotation.TableField; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * 树节点,所有需要实现树节点的,都需要继承该类 * * @author gonghl */ public class TreeNode implements Serializable { private static final Long serialVersionUID = 1L; /** * 主键 */ private Integer id; /** * 上级ID */ private Integer parentId; /** * 子节点列表 */ @TableField(exist = false) private List children = new ArrayList<>(); public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getParentId() { return parentId; } public void setParentId(Integer pid) { this.parentId = pid; } public List getChildren() { return children; } public void setChildren(List children) { this.children = children; } }