package com.starry.admin.modules.system.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.starry.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author admin
 * @since 2022-07-03
 */
@Getter
@Setter
@TableName("sys_menu")
@ApiModel(value = "XlMenu对象", description = "菜单表")
public class SysMenuEntity extends BaseEntity<SysMenuEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("菜单ID")
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    @ApiModelProperty("菜单名")
    private String menuName;

    @ApiModelProperty("菜单编码")
    private String menuCode;

    @ApiModelProperty("权限字符串")
    private String permission;

    @ApiModelProperty("图标")
    private String icon;

    @ApiModelProperty("菜单级别")
    private Long menuLevel;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("父ID")
    private Long parentId;

    @ApiModelProperty("菜单类型;0:目录,1:菜单,2:按钮")
    private String menuType;

    @ApiModelProperty("菜单状态;0正常 1停用")
    private Integer status;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("路由地址")
    private String path;

    @ApiModelProperty("组件路径")
    private String component;

    @ApiModelProperty("路由参数")
    private String routerQuery;

    @ApiModelProperty("是否为外链（0否 1是）")
    private Integer isFrame;

    @ApiModelProperty("菜单状态;0:隐藏 1:显示")
    private Integer visible;

    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<SysMenuEntity> children = new ArrayList<>();
}
