package com.dcsoft.system.domain;

import com.dcsoft.common.core.annotation.Excel;
import com.dcsoft.common.core.web.domain.BaseEntity;
import com.dcsoft.system.api.domain.SysDept;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

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

/**
 * 空间管理对象 sys_space
 *
 * @author nichun
 * @date 2023-03-08
 */
public class SysSpace extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 空间Id */
    private Long id;

    /** 空间名称 */
    @Excel(name = "空间名称")
    private String name;

    /** 父部门id */
    @Excel(name = "父部门id")
    private Long parentId;

    /** 祖级列表 */
    private String ancestors;

    /** 空间类型（0父级 1子级） */
    @Excel(name = "空间类型", readConverterExp = "0=父级,1=子级")
    private String type;

    /** 子空间 */
    private List<SysSpace> children = new ArrayList<SysSpace>();

    /** 子空间 */
    private List<SysPoint> children1 = new ArrayList<SysPoint>();

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getParentId()
    {
        return parentId;
    }
    public void setAncestors(String ancestors)
    {
        this.ancestors = ancestors;
    }

    public String getAncestors()
    {
        return ancestors;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }

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


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

    public List<SysPoint> getChildren1() {
        return children1;
    }

    public void setChildren1(List<SysPoint> children1) {
        this.children1 = children1;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("parentId", getParentId())
            .append("ancestors", getAncestors())
            .append("type", getType())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }



}
