package com.dayou.bo;

import lombok.Data;

import java.util.List;

/**
 * 类说明：
 *
 * @author: wucl
 * @since: 2023/8/9
 * created with IntelliJ IDEA.
 */
@Data
public class HeadlineTreeBO implements Tree<Long,String> {


    /**
     * id
     */
    private Long id;

    /**
     * 模板占位符
     */
    private String placeholder;

    /**
     * 标题
     */
    private String headline;

    /**
     * 标题号
     */
    private String headlineNum;

    /**
     * 样式
     */
    private String style;

    /**
     * 父标题id
     */
    private Long parentId;

    /**
     * 根节点id
     */
    private Long rootId;
    /**
     * 层级
     */
    private Integer level;

    /**
     * 序号
     */
    private Integer orderNum;

    private List<HeadlineTreeBO> children;

    @Override
    public String getName() {
        return headline;
    }

    @Override
    public int order() {
        return orderNum;
    }

    @Override
    public void setChildren(List<? extends Tree<Long, String>> children) {
        this.children = (List<HeadlineTreeBO>) children;
    }
}
