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

package com.mortals.xhx.module.attach.model;

import com.mortals.framework.model.BaseEntityLong;

import java.util.Date;

/**
 * <p>Title: 资料附件表</p>
 * <p>Description: AttachEntity  </p>
 * <p>Copyright: Copyright &reg;  </p>
 * <p>Company: </p>
 * @author 
 * @version 1.0.0
 */
public class AttachEntity extends BaseEntityLong{
	private static final long serialVersionUID = 1609127331815L;
	
	/** 关联主表表名 */
	private String tableCode;

	/** 关联主表某一字段数据 */
	private Long tableDataId;

	/** 附件分类，参数配置-MateriaAttachType */
	private Integer attachType;

	/** 附件名称 */
	private String attachName;

	/** 附件相对URL，/{materiaUniFullCode}/{attachType}/{attachName} */
	private String attachUrl;

	/** 备注 */
	private String remark;

	/** 变更时间 */
	private Date updateTime;

	/** 变更用户loginName */
	private String updateUser;

	/** 创建时间 */
	private Date createTime;

	/** 创建用户loginName */
	private String createUser;


	public AttachEntity(){
		
	}
	/**
	 * 获取 关联主表表名
	 * @return tableCode
	 */
	public String getTableCode(){
		return this.tableCode;
	}

	/**
	 * 设置 关联主表表名
	 * @param tableCode
	 */
	public void setTableCode(String tableCode){
		this.tableCode = tableCode;
	}

	/**
	 * 获取 关联主表某一字段数据
	 * @return tableDataId
	 */
	public Long getTableDataId(){
		return this.tableDataId;
	}

	/**
	 * 设置 关联主表某一字段数据
	 * @param tableDataId
	 */
	public void setTableDataId(Long tableDataId){
		this.tableDataId = tableDataId;
	}

	/**
	 * 获取 附件分类，参数配置-MateriaAttachType
	 * @return attachType
	 */
	public Integer getAttachType(){
		return this.attachType;
	}

	/**
	 * 设置 附件分类，参数配置-MateriaAttachType
	 * @param attachType
	 */
	public void setAttachType(Integer attachType){
		this.attachType = attachType;
	}

	/**
	 * 获取 附件名称
	 * @return attachName
	 */
	public String getAttachName(){
		return this.attachName;
	}

	/**
	 * 设置 附件名称
	 * @param attachName
	 */
	public void setAttachName(String attachName){
		this.attachName = attachName;
	}

	/**
	 * 获取 附件相对URL，/{materiaUniFullCode}/{attachType}/{attachName}
	 * @return attachUrl
	 */
	public String getAttachUrl(){
		return this.attachUrl;
	}

	/**
	 * 设置 附件相对URL，/{materiaUniFullCode}/{attachType}/{attachName}
	 * @param attachUrl
	 */
	public void setAttachUrl(String attachUrl){
		this.attachUrl = attachUrl;
	}

	/**
	 * 获取 备注
	 * @return remark
	 */
	public String getRemark(){
		return this.remark;
	}

	/**
	 * 设置 备注
	 * @param remark
	 */
	public void setRemark(String remark){
		this.remark = remark;
	}

	/**
	 * 获取 变更时间
	 * @return updateTime
	 */
	public Date getUpdateTime(){
		return this.updateTime;
	}

	/**
	 * 设置 变更时间
	 * @param updateTime
	 */
	public void setUpdateTime(Date updateTime){
		this.updateTime = updateTime;
	}

	/**
	 * 获取 变更用户loginName
	 * @return updateUser
	 */
	public String getUpdateUser(){
		return this.updateUser;
	}

	/**
	 * 设置 变更用户loginName
	 * @param updateUser
	 */
	public void setUpdateUser(String updateUser){
		this.updateUser = updateUser;
	}

	/**
	 * 获取 创建时间
	 * @return createTime
	 */
	public Date getCreateTime(){
		return this.createTime;
	}

	/**
	 * 设置 创建时间
	 * @param createTime
	 */
	public void setCreateTime(Date createTime){
		this.createTime = createTime;
	}

	/**
	 * 获取 创建用户loginName
	 * @return createUser
	 */
	public String getCreateUser(){
		return this.createUser;
	}

	/**
	 * 设置 创建用户loginName
	 * @param createUser
	 */
	public void setCreateUser(String createUser){
		this.createUser = createUser;
	}


	@Override
	public int hashCode() {
		return this.getId().hashCode();
	}
	@Override
	public boolean equals(Object obj) {
		if (obj == null)
			return false;
		if (obj instanceof AttachEntity) {
			AttachEntity tmp = (AttachEntity) 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(",tableCode:").append(getTableCode())
		  .append(",tableDataId:").append(getTableDataId())
		  .append(",attachType:").append(getAttachType())
		  .append(",attachName:").append(getAttachName())
		  .append(",attachUrl:").append(getAttachUrl())
		  .append(",remark:").append(getRemark())
		  .append(",updateTime:").append(getUpdateTime())
		  .append(",updateUser:").append(getUpdateUser())
		  .append(",createTime:").append(getCreateTime())
		  .append(",createUser:").append(getCreateUser());
		return sb.toString();
	}
	public void initAttrValue(){
		this.tableCode = null;
		this.tableDataId = null;
		this.attachType = null;
		this.attachName = null;
		this.attachUrl = null;
		this.remark = null;
		this.updateTime = null;
		this.updateUser = null;
		this.createTime = null;
		this.createUser = null;
	}
}