package com.starry.admin.modules.system.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import lombok.Data;

/**
 * @author admin 路由配置信息
 * @since 2022/7/6
 */
@Data
@ApiModel(value = "路由信息", description = "前端路由配置信息")
public class RouterVo {

    @ApiModelProperty(value = "路由名字", example = "System", notes = "路由的唯一标识名称")
    private String name;

    @ApiModelProperty(value = "路由地址", example = "/system", notes = "URL路径")
    private String path;

    @ApiModelProperty(value = "是否隐藏路由", example = "false", notes = "当设置为true时该路由不会在侧边栏出现")
    private boolean hidden;

    @ApiModelProperty(value = "重定向地址", example = "noRedirect", notes = "当设置noRedirect时该路由在面包屑导航中不可被点击")
    private String redirect;

    @ApiModelProperty(value = "组件地址", example = "Layout", notes = "对应的前端组件路径")
    private String component;

    /**
     * 路由参数：如 {"id": 1, "name": "ry"}
     */
    @ApiModelProperty(value = "路由参数", example = "{\"id\": 1, \"name\": \"admin\"}", notes = "路由参数，JSON格式")
    private String routerQuery;

    @ApiModelProperty(value = "是否总是显示", example = "true", notes = "当一个路由下面的children声明的路由大于1个时，自动会变成嵌套的模式")
    private Boolean alwaysShow;

    @ApiModelProperty(value = "路由元信息", notes = "路由的其他配置信息")
    private MetaVo meta;

    @ApiModelProperty(value = "子路由", notes = "子路由配置信息")
    private List<RouterVo> children;

}
