package api.common.pojo.vo.system;

import api.common.pojo.annotation.WChildren;
import api.common.pojo.annotation.WId;
import api.common.pojo.annotation.WParentId;
import lombok.Data;

import java.util.List;

public class MenuVO {

    //主键
    @WId
    private String id;
    //菜单名称
    private String name;
    //菜单路由
    private String router;
    //图标
    private String icon;
    //菜单排序
    private int sort;
    //父id
    @WParentId
    private String parentId;
    //是否可见
    private String visible;
    @WChildren
    private List<MenuVO> children;


    public MenuVO() {
    }

    public MenuVO(String id, String name, String router, String icon, int sort, String parentId, String visible, List<MenuVO> children) {
        this.id = id;
        this.name = name;
        this.router = router;
        this.icon = icon;
        this.sort = sort;
        this.parentId = parentId;
        this.visible = visible;
        this.children = children;
    }

    @Override
    public String toString() {
        return "MenuVO{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", router='" + router + '\'' +
                ", icon='" + icon + '\'' +
                ", sort=" + sort +
                ", parentId='" + parentId + '\'' +
                ", visible='" + visible + '\'' +
                ", children=" + children +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRouter() {
        return router;
    }

    public void setRouter(String router) {
        this.router = router;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getVisible() {
        return visible;
    }

    public void setVisible(String visible) {
        this.visible = visible;
    }

    public List<MenuVO> getChildren() {
        return children;
    }

    public void setChildren(List<MenuVO> children) {
        this.children = children;
    }
}
