/*
 * Copyright (c) 2019, PANNK and/or its affiliates. All rights reserved.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
package com.pannk.mms.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pannk.mms.common.base.BaseEntity;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * 系统菜单
 *
 * @author：wolf
 * @date：2020/11/2 23:31
 **/
@Data
@TableName("sys_menu")
public class SysMenuEntity extends BaseEntity {

    private static final long serialVersionUID = -3799411530346393118L;
    @TableId
    private Long id;

    /**
     * 父ID
     */
    private Long parentId;

    /**
     * 名称
     */
    @NotBlank(message = "菜单名称不能为空")
    private String name;

    /**
     * 菜单url
     */
    private String url;

    /**
     * 类型,0:目录,1:菜单,2:按钮
     */
    private Integer type;

    /**
     * 菜单权限
     */
    private String perms;

    /**
     * 菜单图标
     */
    private String icon;

    /**
     * 序号
     */
    private Integer seq;

    /**
     * ztree属性
     */
    @TableField(exist = false)
    private Boolean open;

    /**
     * 子菜单
     */
    @TableField(exist = false)
    private List<?> list;
}
