package com.bonus.common.biz.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
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;

    /** 子节点数量 */
    private Integer number;

    @ApiModelProperty(value = "是否录入编码（0：否，1：是）")
    private String isEnter;

    @ApiModelProperty(value = "库管员id")
    private Long keeperUserId;

    public TreeSelect() {

    }

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

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

}
