package com.ifish.entity;

import java.io.Serializable;
import java.math.BigDecimal;
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.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

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

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

	private static final long serialVersionUID = -4328045174375463938L;
	/**
	 * ID
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="question_id")
	private Integer questionId;
	/**
	 * 用户ID
	 */
	@Column(name="user_id",nullable=true)
	@NotNull
	@Min(1)
	private Integer userId;
	/**
	 * 是否打赏
	 */
	@Column(name="is_pay_tour",nullable=false,length=1)
	private String isPayTour;
	/**
	 * 打赏金额
	 */
	@Column(name="pay_tour_sum",nullable=false)
	private BigDecimal payTourSum;
	/**
	 * 提问内容
	 */
	@Column(name="question_content",nullable=true,length=200)
	@NotBlank
	@Length(max=200)
	private String questionContent;
	/**
	 * 创建时间
	 */
	@JsonSerialize(using = CustomDateSerializer.class)
	@Column(name="create_time",columnDefinition="timestamp",updatable=false,length=1)
	private Date createTime;
	
	public Integer getQuestionId() {
		return questionId;
	}
	public void setQuestionId(Integer questionId) {
		this.questionId = questionId;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public String getQuestionContent() {
		return questionContent;
	}
	public void setQuestionContent(String questionContent) {
		this.questionContent = questionContent;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getIsPayTour() {
		return isPayTour;
	}
	public void setIsPayTour(String isPayTour) {
		this.isPayTour = isPayTour;
	}
	public BigDecimal getPayTourSum() {
		return payTourSum;
	}
	public void setPayTourSum(BigDecimal payTourSum) {
		this.payTourSum = payTourSum;
	}
	
}
