package cn.com.countrygarden.bi.main.model.review;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.Date;


/**
 * 问题表
 *
 * @author 汤婷
 * @email www.justintoforest@gamail.com
 * @url 
 * @date 2018-06-25
 */
/**
 * @author 木木子
 *
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "review_questionnaire_problem")
public class ReviewQuestionnaireProblem implements Serializable{
    private static final long serialVersionUID = 1L;
    /**
     * 问题id
     * 
     */
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Integer id;
    
    @Transient
    private String titleid;
    
    /**
     * 问卷ID
     */
 	@Column(name="questionnaire_id")
    private Integer questionnaireId;
    /**
     * 问题分类ID
     */
 	@Column(name="questionnaire_problem_classification_id")
    private Integer questionnaireProblemClassificationId;
    /**
     * 题型ID
     */
 	@Column(name="question_type_id")
    private Integer questionTypeId;
    /**
     * 打分
     */
 	@Column(name="score")
    private Integer score;
    /**
     * 题目名称描述
     */
 	@Column(name="title_description")
    private String titleDescription;
    /**
     * 问答题的答案描述
     * 答案描述
     */
 	@Column(name="answer_description")
    private String answerDescription;
    /**
     * 标识字段（0:false，1:true）
     */
 	@Column(name="flag")
    private Integer flag;
    /**
     * 创建人
     */
 	@Column(name="create_by")
    private String createBy;
    /**
     * 创建时间
     */
   // @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    /**
     * 修改人
     */
 	@Column(name="update_by")
    private String updateBy;
    /**
     * 修改时间
     */
//    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
//    private Date updateTime;
    
    @JsonFormat(pattern="yyyy/MM/dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    
    /**
     * 问题分类对象
     */
    @Transient
    private ReviewQuestionnaireProblemClassification reviewquestionnaireproblemclassification;
    
    public ReviewQuestionnaireProblemClassification getReviewquestionnaireproblemclassification() {
		return reviewquestionnaireproblemclassification;
	}
	public void setReviewquestionnaireproblemclassification(
			ReviewQuestionnaireProblemClassification reviewquestionnaireproblemclassification) {
		this.reviewquestionnaireproblemclassification = reviewquestionnaireproblemclassification;
	}
	
	/**
	 * 题型分类对象
	 */
	 @Transient
	private ReviewQuestionnaireProblemType reviewquestionnaireproblemtype;
	
	public ReviewQuestionnaireProblemType getReviewquestionnaireproblemtype() {
		return reviewquestionnaireproblemtype;
	}
	public void setReviewquestionnaireproblemtype(ReviewQuestionnaireProblemType reviewquestionnaireproblemtype) {
		this.reviewquestionnaireproblemtype = reviewquestionnaireproblemtype;
	}
	
	
	public ReviewQuestionnaireProblem() {
          super();
    }
    public void setId(Integer id) {
          this.id = id;
    }
	
    public Integer getId() {
          return id;
    }
    public void setQuestionnaireId(Integer questionnaireId) {
          this.questionnaireId = questionnaireId;
    }
	
    public Integer getQuestionnaireId() {
          return questionnaireId;
    }
    public void setQuestionnaireProblemClassificationId(Integer questionnaireProblemClassificationId) {
          this.questionnaireProblemClassificationId = questionnaireProblemClassificationId;
    }
	
    public Integer getQuestionnaireProblemClassificationId() {
          return questionnaireProblemClassificationId;
    }
    public void setQuestionTypeId(Integer questionTypeId) {
          this.questionTypeId = questionTypeId;
    }
	
    public Integer getQuestionTypeId() {
          return questionTypeId;
    }
    public void setScore(Integer score) {
          this.score = score;
    }
	
    public Integer getScore() {
          return score;
    }
    public void setTitleDescription(String titleDescription) {
          this.titleDescription = titleDescription;
    }
	
    public String getTitleDescription() {
          return titleDescription;
    }
    public void setAnswerDescription(String answerDescription) {
          this.answerDescription = answerDescription;
    }
	
    public String getAnswerDescription() {
          return answerDescription;
    }
    public void setFlag(Integer flag) {
          this.flag = flag;
    }
	
    public Integer getFlag() {
          return flag;
    }
    public void setCreateBy(String createBy) {
          this.createBy = createBy;
    }
	
    public String getCreateBy() {
          return createBy;
    }
    public void setCreateTime(Date createTime) {
          this.createTime = createTime;
    }
	
    public Date getCreateTime() {
    	if(this.createTime==null) {
     		 return new Date();
     	}
          return createTime;
    }
    public void setUpdateBy(String updateBy) {
          this.updateBy = updateBy;
    }
	
    public String getUpdateBy() {
          return updateBy;
    }
    public void setUpdateTime(Date updateTime) {
          this.updateTime = updateTime;
    }
	
    public Date getUpdateTime() {
          return updateTime;
    }
	public String getTitleid() {
		return titleid;
	}
	public void setTitleid(String titleid) {
		this.titleid = titleid;
	}
    
    
}
