package jnpf.model.authority.vo.menu;

import jnpf.model.authority.po.FtbPermissionFunctionMenu;
import lombok.Data;

/**
 * @Author: peng.hao
 * @create: 2025/3/11
 */
@Data
public class FtbPermissionFunctionMenuVO {

    private  String id;
    /** 侧边栏菜单主键id */
    private String functionId;

    /** 子页面及按钮菜单编码 */
    private String funcCoding;

    /** 名称 */
    private String funName;

    /** 菜单类型,0子页面1按钮 */
    private Integer funType;

    /** 菜单配置父类主键id，0代表顶级 */
    private String parentId;

    /** 侧边栏菜单编码 */
    private String originalCoding;

    /**
     * 页面类型,0web菜单1app菜单2pc菜单
     */
    private Integer pageType;

    public static FtbPermissionFunctionMenuVO convert(FtbPermissionFunctionMenu entity) {
        if (entity == null) {
            return null;
        }
        FtbPermissionFunctionMenuVO ftbPermissionFunctionMenuVO = new FtbPermissionFunctionMenuVO();
        ftbPermissionFunctionMenuVO.setFunctionId(entity.getFunctionId());
        ftbPermissionFunctionMenuVO.setFuncCoding(entity.getFuncCoding());
        ftbPermissionFunctionMenuVO.setFunName(entity.getFunName());
        ftbPermissionFunctionMenuVO.setFunType(entity.getFunType());
        ftbPermissionFunctionMenuVO.setParentId(entity.getParentId());
        ftbPermissionFunctionMenuVO.setOriginalCoding(entity.getOriginalCoding());
        ftbPermissionFunctionMenuVO.setPageType(entity.getPageType());
        ftbPermissionFunctionMenuVO.setId(entity.getId());
        return ftbPermissionFunctionMenuVO;
    }
}
