package com.ruoyi.ems.domain;

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

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

/**
 * 能源分类对象 dim_gb_ems_cls
 * 
 * @author ruoyi
 * @date 2024-07-30
 */
public class EmsCls extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    private Long id;

    /** 能源代码 */
    private String code;

    /** 能源种类 */
    private String name;

    /** 说明 */
    private String desc;

    /** 分类层级 1-大类，2-中类，3-小类 */
    private Long level;

    /** 父类代码 */
    private String parentCode;

    /** 数据版本 */
    private String version;

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

    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 void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setDesc(String desc) 
    {
        this.desc = desc;
    }

    public String getDesc() 
    {
        return desc;
    }
    public void setLevel(Long level) 
    {
        this.level = level;
    }

    public Long getLevel() 
    {
        return level;
    }
    public void setParentCode(String parentCode) 
    {
        this.parentCode = parentCode;
    }

    public String getParentCode() 
    {
        return parentCode;
    }
    public void setVersion(String version) 
    {
        this.version = version;
    }

    public String getVersion() 
    {
        return version;
    }

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

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

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("name", getName())
            .append("desc", getDesc())
            .append("level", getLevel())
            .append("parentCode", getParentCode())
            .append("version", getVersion())
            .toString();
    }
}
