package com.yeejoin.amos.fas.business.vo;

import com.yeejoin.amos.fas.dao.entity.PlanClassifyTree;
import org.typroject.tyboot.core.foundation.utils.TreeNode;

import java.util.Collection;
import java.util.HashSet;

/**
 *@program: YeeAmosFireAutoSysRoot
 *@description: 预案分类树
 *@author: wujunkai
 *@create: 2021-01-14 11:37
 */
public class PlanClassifyTreeVo extends PlanClassifyTree implements TreeNode<PlanClassifyTreeVo,Long> {

    private Collection<PlanClassifyTreeVo> children = new HashSet<>();

    @Override
    public Long getMyParentId() {
        return this.getParentId();
    }

    @Override
    public Long getMyId() {
        return this.getId();
    }

    @Override
    public Collection<PlanClassifyTreeVo> getChildren() {
        return children;
    }

    @Override
    public void setChildren(Collection<PlanClassifyTreeVo> collection) {
        this.children  = collection;
    }

    @Override
    public int compareTo(PlanClassifyTreeVo planClassifyTree) {
        return this.getClassifyName().compareTo(planClassifyTree.getClassifyName());
    }

}