GetSubjectTreeVO.java 2.01 KB
package com.meishu.vo.subject;

import lombok.Data;

import java.util.List;

@Data
public class GetSubjectTreeVO implements Comparable<GetSubjectTreeVO> {


    private Long id;

    private Long subjectId;

    /**
     * 章节
     */
    private Integer chapterId;

    /**
     * 知识点名称
     */
    private String treeName;

    /**
     * 写程序使用,数据库不存值
     */
    private List<GetSubjectTreeVO> children;

    /**
     * 父节点
     */
    private Long parentId;

    /**
     * 子节点个数
     */
    private Integer childNodeCounts;

    private String parentTreeName;

    private String treeNode;

    /**
     * 视频个数 个人库数量
     */
    private Integer vodCounts;

    /**
     * 视频个数  公共库数量
     */
    private Integer publicVodCounts;

    /**
     * 题目个数
     */
    private Integer exerciseCounts;

    /**
     *视频个数  公共库数量
     */
    private Integer publicExerciseVodCounts;

    /**
     * 视频审核个数
     */
    private Integer checkVodCounts;

    /**
     * 题目审核个数
     */
    private Integer checkExerciseCounts;

    /**
     * 视频待审核个数
     */
    private Integer toCheckVodCounts;

    /**
     * 题目待审核个数
     */
    private Integer toCheckExerciseCounts;

    /**
     * 子节点集合
     */
    private List<Integer> childTreeIds;

    private String number;

    private String text;

    private String layer;

    private int level;

    public GetSubjectTreeVO(Long id, String number, Long parentId, int level) {
        this.id = id;
        this.number = number;
        this.parentId = parentId;
        this.level = level;
    }

    @Override
    public int compareTo(GetSubjectTreeVO o) {
        if (this.level != o.level) {
            return o.level - this.level;
        } else {
            if(this.number==null){
                return -1;
            }
            return this.number.compareTo(o.number);
        }
    }

    public GetSubjectTreeVO(){

    }
}