CustomVideoMenuVO.java 800 字节
package com.skua.modules.customvideo.vo;

import com.skua.modules.customvideo.entity.CustomVideoMenu;
import lombok.Data;

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

/**
 * @author sonin
 * @date 2021/12/15 14:04
 */
@Data
public class CustomVideoMenuVO {

    private String id;

    private String parentId;

    private String title;

    private Integer sort;

    private boolean isLeaf;

    private List<CustomVideoMenuVO> children;

    public CustomVideoMenuVO(CustomVideoMenu entity) {
        this.id = entity.getId();
        this.parentId = entity.getParentId();
        this.title = entity.getTitle();
        this.sort = entity.getSort();
        this.isLeaf = entity.isLeaf();
        if (!entity.isLeaf()) {
            this.children = new ArrayList<>();
        }
    }

}