package com.ruoyi.web.modules.category.domain.vo;

import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * 资讯类别树节点（JSON 字段：code、name、categoryType、moduleId、children）。
 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class InformationCategoryTreeVo
{
    private String code;

    private String name;

    /** 类型（可选） */
    private String categoryType;

    /** 模块编码（01养殖资讯，02畜牧资源，03农技课堂） */
    private String moduleId;

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

    public String getCode()
    {
        return code;
    }

    public void setCode(String code)
    {
        this.code = code;
    }

    public String getName()
    {
        return name;
    }

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

    public String getCategoryType()
    {
        return categoryType;
    }

    public void setCategoryType(String categoryType)
    {
        this.categoryType = categoryType;
    }

    public String getModuleId()
    {
        return moduleId;
    }

    public void setModuleId(String moduleId)
    {
        this.moduleId = moduleId;
    }

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

    public void setChildren(List<InformationCategoryTreeVo> children)
    {
        this.children = children != null ? children : new ArrayList<>();
    }
}
