package com.bonus.common.biz.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * TreeSelect树结构实体类
 * @author syruan
 */
@Data
public class TreeSelect implements Serializable {

    private static final long serialVersionUID = 469203039368157600L;

    /** 节点ID */
    private Long id;

    /** 节点名称 */
    private String label;

    /** 节点级别 */
    private Integer level;

    /** 父节点id */
    private Long parentId;

    /** 公司id */
    private String companyId;

    /** 仓库id */
    private Long houseId;

    /** 子节点集合 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<TreeSelect> children;

    public TreeSelect() {

    }

    public TreeSelect(Long id, String label, Long houseId, Integer level, Long parentId, List<TreeSelect> children) {
        this.id = id;
        this.label = label;
        this.houseId = houseId;
        this.level = level;
        this.parentId = parentId;
        this.children = children;
    }

    public TreeSelect(Long id, String label, Integer level, Long parentId) {
        this.id = id;
        this.label = label;
        this.level = level;
        this.parentId = parentId;
    }

}
