package com.yunzhi.marketing.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 菜单表 不同系统,菜单不一致
 * </p>
 *
 * @author jobob
 * @since 2019-09-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 菜单ID
     */
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Integer menuId;

    /**
     * 菜单编码
     */
    private String code;

    /**
     * 菜单名称
     */
    private String name;

    /**
     * 父级菜单
     */
    private String parentCode;

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

    /**
     * 所属系统
     */
    private String appType;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 模块ID, 也是根菜单ID
     */
    private Integer menuRoot;

    /**
     * 排序
     */
    private Integer sortNum;

    /**
     * 是否有权限
     */
    @TableField(exist = false)
    private Boolean hasRights;

    /**
     * 是否有权限
     */
    @TableField(exist = false)
    private List<Integer> roles;

    /**
     * 菜单下的按钮
     */
    @TableField(exist = false)
    private List<SysButtonInMenu> sysButtonInMenu;
}
