You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.8 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.macro.mall.model;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* UmsRoleMenuRelation 类表示角色和菜单之间的关系。
* 它实现了 Serializable 接口,以便对象可以被序列化。
*/
public class UmsRoleMenuRelation implements Serializable {
// 唯一标识符
private Long id;
// 角色ID
@ApiModelProperty(value = "角色ID")
private Long roleId;
// 菜单ID
@ApiModelProperty(value = "菜单ID")
private Long menuId;
// 序列化版本UID用于确保在反序列化时类的一致性
private static final long serialVersionUID = 1L;
// 获取ID的方法
public Long getId() {
return id;
}
// 设置ID的方法
public void setId(Long id) {
this.id = id;
}
// 获取角色ID的方法
public Long getRoleId() {
return roleId;
}
// 设置角色ID的方法
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
// 获取菜单ID的方法
public Long getMenuId() {
return menuId;
}
// 设置菜单ID的方法
public void setMenuId(Long menuId) {
this.menuId = menuId;
}
// 重写 toString 方法,用于生成对象的字符串表示形式
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName()); // 添加类名
sb.append(" [");
sb.append("Hash = ").append(hashCode()); // 添加哈希码
sb.append(", id=").append(id); // 添加ID
sb.append(", roleId=").append(roleId); // 添加角色ID
sb.append(", menuId=").append(menuId); // 添加菜单ID
sb.append(", serialVersionUID=").append(serialVersionUID); // 添加序列化版本UID
sb.append("]");
return sb.toString();
}
}