/**
* 文件：RoleUserEntity.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: RoleUserEntity  </p>
 * <p>Copyright: Copyright &reg;  </p>
 * <p>Company: </p>
 * @author 
 * @version 1.0.0
 */
public class RoleUserEntity extends BaseEntityLong{
	private static final long serialVersionUID = 1547777703351L;
	
	/** 角色ID */
	private Long roleId;

	/** 用户ID */
	private Long userId;


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

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

	/**
	 * 获取 用户ID
	 * @return userId
	 */
	public Long getUserId(){
		return this.userId;
	}

	/**
	 * 设置 用户ID
	 * @param userId
	 */
	public void setUserId(Long userId){
		this.userId = userId;
	}


	@Override
	public int hashCode() {
		return this.getId().hashCode();
	}
	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;
		if (obj instanceof RoleUserEntity) {
			RoleUserEntity tmp = (RoleUserEntity) 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(",userId:").append(getUserId());
		return sb.toString();
	}
	public void initAttrValue(){
		this.roleId = null;
		this.userId = null;
	}
}