com.itheima.auth.sdk.dto.ResourceDTO Maven / Gradle / Ivy
package com.itheima.auth.sdk.dto;
import java.io.Serializable;
/**
*
* 实体类
* 资源
*
*/
public class ResourceDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
@Override
public int hashCode() {
return (method + "/" + url).hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj instanceof ResourceDTO) {
ResourceDTO entity = (ResourceDTO) obj;
return ((method + "/" + url).equals(entity.getMethod() + "/" + entity.getUrl()));
}
return super.equals(obj);
}
/**
* 资源编码
* 规则:
* 链接:
* 数据列:
* 按钮:
*/
private String code;
/**
* 接口名称
*/
private String name;
/**
* 请求方式
*/
private String method;
/**
* 接口地址
*/
private String url;
/**
* 菜单ID
* #itcast_auth_menu
*/
private Long menuId;
/**
* 接口描述
*/
private String describe;
private Long applicationId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Long getMenuId() {
return menuId;
}
public void setMenuId(Long menuId) {
this.menuId = menuId;
}
public String getDescribe() {
return describe;
}
public void setDescribe(String describe) {
this.describe = describe;
}
public Long getApplicationId() {
return applicationId;
}
public void setApplicationId(Long applicationId) {
this.applicationId = applicationId;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("ResourceDTO{");
sb.append("id=").append(id);
sb.append(", code='").append(code).append('\'');
sb.append(", name='").append(name).append('\'');
sb.append(", method='").append(method).append('\'');
sb.append(", url='").append(url).append('\'');
sb.append(", menuId=").append(menuId);
sb.append(", describe='").append(describe).append('\'');
sb.append(", applicationId=").append(applicationId);
sb.append('}');
return sb.toString();
}
}