package com.ifish.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ifish.serializer.CustomDateSerializer;

/** 
 * @ClassName: tbl_comment 
 * @date 2015年7月2日 下午16:40:00 
 *  
 */
@Entity
@Table(name="tbl_comment")
public class Comment implements Serializable{

	private static final long serialVersionUID = 1312658178156695378L;
	/**
	 * ID
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="comment_id")
	private Integer commentId;
	/**
	 * 编辑器ID
	 */
	@Column(name="ueditor_id")
	private Integer ueditorId;
	/**
	 * 用户ID
	 */
	@Column(name="user_id")
	private Integer userId;
	/**
	 * 回复用户ID
	 */
	@Column(name="as_user_id")
	private Integer asUserId;
	/**
	 * 回复用户名称
	 */
	@Transient
	private String asUserName;
	/**
	 * 头像
	 */
	@Transient
	private String userImg;
	/**
	 * 用户
	 */
	@Transient
	private String userName;
	/**
	 * 内容
	 */
	@Column(name="comment_content",nullable=true,length=200)
	private String commentContent;
	/**
	 * 创建时间
	 */
	@JsonSerialize(using = CustomDateSerializer.class)
	@Column(name="create_time",columnDefinition="timestamp",updatable=false,length=1)
	private Date createTime;
	
	public Integer getCommentId() {
		return commentId;
	}
	public void setCommentId(Integer commentId) {
		this.commentId = commentId;
	}
	public Integer getUeditorId() {
		return ueditorId;
	}
	public void setUeditorId(Integer ueditorId) {
		this.ueditorId = ueditorId;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public String getCommentContent() {
		return commentContent;
	}
	public void setCommentContent(String commentContent) {
		this.commentContent = commentContent;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getUserImg() {
		return userImg;
	}
	public void setUserImg(String userImg) {
		this.userImg = userImg;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public Integer getAsUserId() {
		return asUserId;
	}
	public void setAsUserId(Integer asUserId) {
		this.asUserId = asUserId;
	}
	public String getAsUserName() {
		return asUserName;
	}
	public void setAsUserName(String asUserName) {
		this.asUserName = asUserName;
	}
	
}
