package com.ruoyi.asset.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

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

/**
 * 所属位置对象 tb_location
 * 
 * @author 原动力
 * @date 2023-05-15
 */
public class TbLocation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    /** 位置编号 */
    @Excel(name = "位置编号")
    private String number;

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

    /** 父级ID，无则为0 */
    @Excel(name = "所属公司")
    private Long parentId;

    /** 祖级列表 */
    @Excel(name = "祖级列表")
    private String sequence;

    /** 位置标签 */
    @Excel(name = "位置标签")
    private String label;

    private List<TbLocation> children = new ArrayList<>();

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

    public Long getId() 
    {
        return id;
    }
    public void setNumber(String number) 
    {
        this.number = number;
    }

    public String getNumber() 
    {
        return number;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getSequence() {
        return sequence;
    }

    public void setSequence(String sequence) {
        this.sequence = sequence;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

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

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

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("number", getNumber())
            .append("name", getName())
            .append("parentId", getParentId())
            .append("sequence", getSequence())
            .append("label", getLabel())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("children", getChildren())
            .toString();
    }
}
