package com.ruoyi.sy.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;

/**
 * 职业对象 sy_vocational
 * 
 * @author mingxue
 * @date 2022-03-30
 */
public class SyVocational extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 编码 */
    @Excel(name = "编码")
    private String code;

    /** 父编码 */
    @Excel(name = "父编码")
    private String parentCode;

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

    private String type;

    /** 层级 */
    @Excel(name = "层级")
    private Integer level;
    /**职业类数量 子级数量**/
    private Integer childCount;
    /**职业数量 孙级数量**/
    private Integer grandchildCount;

    /** 祖级编码 */
    @Excel(name = "祖级编码")
    private String ancestors;

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

    //冗余给Major的树结构使用
    /** 修业年限 **/
    private String learnYearArab;

    public String getLearnYearArab() {
        return learnYearArab;
    }

    public void setLearnYearArab(String learnYearArab) {
        this.learnYearArab = learnYearArab;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

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

    public Long getId() 
    {
        return id;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public SyVocational setParentCode(String parentCode)
    {
        this.parentCode = parentCode;
        return this;
    }

    public String getParentCode() 
    {
        return parentCode;
    }
    public SyVocational setName(String name)
    {
        this.name = name;
        return this;
    }

    public String getName() 
    {
        return name;
    }

    public String getType() {
        return type;
    }

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

    public void setLevel(Integer level)
    {
        this.level = level;
    }

    public Integer getLevel()
    {
        return level;
    }
    public void setAncestors(String ancestors) 
    {
        this.ancestors = ancestors;
    }

    public String getAncestors() 
    {
        return ancestors;
    }

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

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

    public Integer getChildCount() {
        return childCount;
    }

    public void setChildCount(Integer childCount) {
        this.childCount = childCount;
    }

    public Integer getGrandchildCount() {
        return grandchildCount;
    }

    public void setGrandchildCount(Integer grandchildCount) {
        this.grandchildCount = grandchildCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("parentCode", getParentCode())
            .append("name", getName())
            .append("level", getLevel())
            .append("createTime", getCreateTime())
            .append("ancestors", getAncestors())
            .append("children", getChildren())
            .toString();
    }
}
