RoleMenu.java 1.05 KB
package com.huaheng.pc.system.role.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 角色和菜单关联 sys_role_menu
 * 
 * @author huaheng
 */
@ApiModel(value="com.huaheng.pc.system.role.domain.RoleMenu")
@Data
@TableName(value = "sys_role_menu")
public class RoleMenu implements Serializable {


    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "roleId")
    @TableField(value = "roleId")
    private Integer roleId;

    @ApiModelProperty(value = "menuId")
    @TableField(value = "menuId")
    private Integer menuId;

    @Override
    public boolean equals(Object obj) {
        RoleMenu roleMenu = (RoleMenu) obj;
        if (roleMenu.getMenuId().intValue() == menuId.intValue() &&
                roleMenu.getRoleId().intValue() == roleId.intValue()) {
            return true;
        }
        return false;
    }

}