/**
* 文件：RoleAuthEntity.java
* 版本：1.0.0
* 日期：
* Copyright &reg; 
* All right reserved.
*/

package com.mortals.xhx.base.system.role.model;



import com.mortals.framework.model.BaseEntityLong;

/**
 * <p>Title: 角色资源权限</p>
 * <p>Description: RoleAuthEntity  </p>
 * <p>Copyright: Copyright &reg;  </p>
 * <p>Company: </p>
 * @author 
 * @version 1.0.0
 */
public class RoleAuthEntity extends BaseEntityLong{
	private static final long serialVersionUID = 1547777703348L;
	
	/** 角色ID */
	private Long roleId;

	/** 资源ID */
	private Long resourceId;


	public RoleAuthEntity(){
		
	}
	/**
	 * 获取 角色ID
	 * @return roleId
	 */
	public Long getRoleId(){
		return this.roleId;
	}

	/**
	 * 设置 角色ID
	 * @param roleId
	 */
	public void setRoleId(Long roleId){
		this.roleId = roleId;
	}

	/**
	 * 获取 资源ID
	 * @return resourceId
	 */
	public Long getResourceId(){
		return this.resourceId;
	}

	/**
	 * 设置 资源ID
	 * @param resourceId
	 */
	public void setResourceId(Long resourceId){
		this.resourceId = resourceId;
	}


	@Override
	public int hashCode() {
		return this.getId().hashCode();
	}
	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;
		if (obj instanceof RoleAuthEntity) {
			RoleAuthEntity tmp = (RoleAuthEntity) obj;
			if (this.getId().longValue() == tmp.getId().longValue()) {
				return true;
			}
		}
		return false;
	}
	public String toString(){
		StringBuilder sb = new StringBuilder("");
		sb.append("id:").append(getId())
		  .append(",roleId:").append(getRoleId())
		  .append(",resourceId:").append(getResourceId());
		return sb.toString();
	}
	public void initAttrValue(){
		this.roleId = null;
		this.resourceId = null;
	}
}