package com.persagy.adm.server.custom.entity;

import com.persagy.dmp.define.entity.ObjectTypeDefine;
import lombok.Data;

import java.util.LinkedList;
import java.util.List;

/**
 * 类型定义，封装children操作，支持树形结构
 */
@Data
public class TypeDef extends ObjectTypeDefine {

	/** 正向交付设备类标注 */
	private boolean m2d;

	private List<TypeDef> children;

	public void addChild(TypeDef child){
		if(children == null)
			children = new LinkedList<>();
		children.add(child);
	}

	public List<? extends TypeDef> getChildren() {
		return children;
	}

}
