package com.yuchen.saas.park.api.vo.park;

import com.yuchen.saas.park.api.entity.park.ParkSpaceInfo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nest.springwrap.core.tool.node.INode;

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

/**
 * @ClassName ParkSpaceInfoTreeVO
 * @Description 园区空间树结构实体
 * @Author 张逸飞
 * @Date 2022/10/26 16:07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "ParkSpaceInfoTreeVO对象", description = "ParkSpaceInfoTreeVO对象")
public class ParkSpaceInfoTreeVO extends ParkSpaceInfo implements INode<ParkSpaceInfoTreeVO> {

    /**
     * 子集列表
     */
    private List<ParkSpaceInfoTreeVO> children;

    @Override
    public List<ParkSpaceInfoTreeVO> getChildren() {
        if (this.children == null) {
            this.children = new ArrayList<>();
        }
        return this.children;
    }
}
