package com.ruoyi.syzy.dto;

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

import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.syzy.domain.BWwwGkmc;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel("高考名词")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GkmcTreeDTO implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("类型")
    private String type;
    @ApiModelProperty("明细")
    private List<GkmcDTO> children;

    public String getType() {
        return type;
    }

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

    public List<GkmcDTO> getChildren() {
        return children;

    }

    public GkmcTreeDTO setChildren(List<GkmcDTO> children) {
        this.children = children;
        return this;
    }

    public GkmcTreeDTO addChild(BWwwGkmc entity) {
        if (null == this.children) {
            this.children = new ArrayList<GkmcDTO>(12);
        }
        this.children.add(new GkmcDTO().setId(entity.getId()).setName(entity.getName()));
        return this;
    }

}
