package com.qxgmat.data.dao.entity;

import com.alibaba.fastjson.JSONObject;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

@Table(name = "question")
public class Question implements Serializable {
    @Id
    @Column(name = "`id`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 关键词，逗号分隔
     */
    @Column(name = "`keyword`")
    private String[] keyword;

    /**
     * 题型
     */
    @Column(name = "`type`")
    private String type;

    /**
     * 考点: 读取setting
     */
    @Column(name = "`place`")
    private String place;

    /**
     * 难度
     */
    @Column(name = "`difficult`")
    private String difficult;

    /**
     * 简介：自动从题干提取
     */
    @Column(name = "`description`")
    private String description;

    /**
     * 内容：json
     */
    @Column(name = "`content`")
    private JSONObject content;

    /**
     * 答案：json
     */
    @Column(name = "`answer`")
    private JSONObject answer;

    @Column(name = "`question_time`")
    private Date questionTime;

    @Column(name = "`qx_time`")
    private Date qxTime;

    @Column(name = "`official_time`")
    private Date officialTime;

    @Column(name = "`association_time`")
    private Date associationTime;

    /**
     * 题源联想：json
     */
    @Column(name = "`association_content`")
    private Integer[] associationContent;

    /**
     * 总作答时间
     */
    @Column(name = "`total_time`")
    private Integer totalTime;

    /**
     * 总作答次数
     */
    @Column(name = "`total_number`")
    private Integer totalNumber;

    /**
     * 总正确次数
     */
    @Column(name = "`total_correct`")
    private Integer totalCorrect;

    @Column(name = "`create_time`")
    private Date createTime;

    @Column(name = "`update_time`")
    private Date updateTime;

    /**
     * 题干
     */
    @Column(name = "`stem`")
    private String stem;

    @Column(name = "`qx_content`")
    private String qxContent;

    @Column(name = "`official_content`")
    private String officialContent;

    private static final long serialVersionUID = 1L;

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取关键词，逗号分隔
     *
     * @return keyword - 关键词，逗号分隔
     */
    public String[] getKeyword() {
        return keyword;
    }

    /**
     * 设置关键词，逗号分隔
     *
     * @param keyword 关键词，逗号分隔
     */
    public void setKeyword(String[] keyword) {
        this.keyword = keyword;
    }

    /**
     * 获取题型
     *
     * @return type - 题型
     */
    public String getType() {
        return type;
    }

    /**
     * 设置题型
     *
     * @param type 题型
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * 获取考点: 读取setting
     *
     * @return place - 考点: 读取setting
     */
    public String getPlace() {
        return place;
    }

    /**
     * 设置考点: 读取setting
     *
     * @param place 考点: 读取setting
     */
    public void setPlace(String place) {
        this.place = place;
    }

    /**
     * 获取难度
     *
     * @return difficult - 难度
     */
    public String getDifficult() {
        return difficult;
    }

    /**
     * 设置难度
     *
     * @param difficult 难度
     */
    public void setDifficult(String difficult) {
        this.difficult = difficult;
    }

    /**
     * 获取简介：自动从题干提取
     *
     * @return description - 简介：自动从题干提取
     */
    public String getDescription() {
        return description;
    }

    /**
     * 设置简介：自动从题干提取
     *
     * @param description 简介：自动从题干提取
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * 获取内容：json
     *
     * @return content - 内容：json
     */
    public JSONObject getContent() {
        return content;
    }

    /**
     * 设置内容：json
     *
     * @param content 内容：json
     */
    public void setContent(JSONObject content) {
        this.content = content;
    }

    /**
     * 获取答案：json
     *
     * @return answer - 答案：json
     */
    public JSONObject getAnswer() {
        return answer;
    }

    /**
     * 设置答案：json
     *
     * @param answer 答案：json
     */
    public void setAnswer(JSONObject answer) {
        this.answer = answer;
    }

    /**
     * @return question_time
     */
    public Date getQuestionTime() {
        return questionTime;
    }

    /**
     * @param questionTime
     */
    public void setQuestionTime(Date questionTime) {
        this.questionTime = questionTime;
    }

    /**
     * @return qx_time
     */
    public Date getQxTime() {
        return qxTime;
    }

    /**
     * @param qxTime
     */
    public void setQxTime(Date qxTime) {
        this.qxTime = qxTime;
    }

    /**
     * @return official_time
     */
    public Date getOfficialTime() {
        return officialTime;
    }

    /**
     * @param officialTime
     */
    public void setOfficialTime(Date officialTime) {
        this.officialTime = officialTime;
    }

    /**
     * @return association_time
     */
    public Date getAssociationTime() {
        return associationTime;
    }

    /**
     * @param associationTime
     */
    public void setAssociationTime(Date associationTime) {
        this.associationTime = associationTime;
    }

    /**
     * 获取题源联想：json
     *
     * @return association_content - 题源联想：json
     */
    public Integer[] getAssociationContent() {
        return associationContent;
    }

    /**
     * 设置题源联想：json
     *
     * @param associationContent 题源联想：json
     */
    public void setAssociationContent(Integer[] associationContent) {
        this.associationContent = associationContent;
    }

    /**
     * 获取总作答时间
     *
     * @return total_time - 总作答时间
     */
    public Integer getTotalTime() {
        return totalTime;
    }

    /**
     * 设置总作答时间
     *
     * @param totalTime 总作答时间
     */
    public void setTotalTime(Integer totalTime) {
        this.totalTime = totalTime;
    }

    /**
     * 获取总作答次数
     *
     * @return total_number - 总作答次数
     */
    public Integer getTotalNumber() {
        return totalNumber;
    }

    /**
     * 设置总作答次数
     *
     * @param totalNumber 总作答次数
     */
    public void setTotalNumber(Integer totalNumber) {
        this.totalNumber = totalNumber;
    }

    /**
     * 获取总正确次数
     *
     * @return total_correct - 总正确次数
     */
    public Integer getTotalCorrect() {
        return totalCorrect;
    }

    /**
     * 设置总正确次数
     *
     * @param totalCorrect 总正确次数
     */
    public void setTotalCorrect(Integer totalCorrect) {
        this.totalCorrect = totalCorrect;
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @return update_time
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取题干
     *
     * @return stem - 题干
     */
    public String getStem() {
        return stem;
    }

    /**
     * 设置题干
     *
     * @param stem 题干
     */
    public void setStem(String stem) {
        this.stem = stem;
    }

    /**
     * @return qx_content
     */
    public String getQxContent() {
        return qxContent;
    }

    /**
     * @param qxContent
     */
    public void setQxContent(String qxContent) {
        this.qxContent = qxContent;
    }

    /**
     * @return official_content
     */
    public String getOfficialContent() {
        return officialContent;
    }

    /**
     * @param officialContent
     */
    public void setOfficialContent(String officialContent) {
        this.officialContent = officialContent;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", keyword=").append(keyword);
        sb.append(", type=").append(type);
        sb.append(", place=").append(place);
        sb.append(", difficult=").append(difficult);
        sb.append(", description=").append(description);
        sb.append(", content=").append(content);
        sb.append(", answer=").append(answer);
        sb.append(", questionTime=").append(questionTime);
        sb.append(", qxTime=").append(qxTime);
        sb.append(", officialTime=").append(officialTime);
        sb.append(", associationTime=").append(associationTime);
        sb.append(", associationContent=").append(associationContent);
        sb.append(", totalTime=").append(totalTime);
        sb.append(", totalNumber=").append(totalNumber);
        sb.append(", totalCorrect=").append(totalCorrect);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", stem=").append(stem);
        sb.append(", qxContent=").append(qxContent);
        sb.append(", officialContent=").append(officialContent);
        sb.append("]");
        return sb.toString();
    }

    public static Question.Builder builder() {
        return new Question.Builder();
    }

    public static class Builder {
        private Question obj;

        public Builder() {
            this.obj = new Question();
        }

        /**
         * @param id
         */
        public Builder id(Integer id) {
            obj.setId(id);
            return this;
        }

        /**
         * 设置关键词，逗号分隔
         *
         * @param keyword 关键词，逗号分隔
         */
        public Builder keyword(String[] keyword) {
            obj.setKeyword(keyword);
            return this;
        }

        /**
         * 设置题型
         *
         * @param type 题型
         */
        public Builder type(String type) {
            obj.setType(type);
            return this;
        }

        /**
         * 设置考点: 读取setting
         *
         * @param place 考点: 读取setting
         */
        public Builder place(String place) {
            obj.setPlace(place);
            return this;
        }

        /**
         * 设置难度
         *
         * @param difficult 难度
         */
        public Builder difficult(String difficult) {
            obj.setDifficult(difficult);
            return this;
        }

        /**
         * 设置简介：自动从题干提取
         *
         * @param description 简介：自动从题干提取
         */
        public Builder description(String description) {
            obj.setDescription(description);
            return this;
        }

        /**
         * 设置内容：json
         *
         * @param content 内容：json
         */
        public Builder content(JSONObject content) {
            obj.setContent(content);
            return this;
        }

        /**
         * 设置答案：json
         *
         * @param answer 答案：json
         */
        public Builder answer(JSONObject answer) {
            obj.setAnswer(answer);
            return this;
        }

        /**
         * @param questionTime
         */
        public Builder questionTime(Date questionTime) {
            obj.setQuestionTime(questionTime);
            return this;
        }

        /**
         * @param qxTime
         */
        public Builder qxTime(Date qxTime) {
            obj.setQxTime(qxTime);
            return this;
        }

        /**
         * @param officialTime
         */
        public Builder officialTime(Date officialTime) {
            obj.setOfficialTime(officialTime);
            return this;
        }

        /**
         * @param associationTime
         */
        public Builder associationTime(Date associationTime) {
            obj.setAssociationTime(associationTime);
            return this;
        }

        /**
         * 设置题源联想：json
         *
         * @param associationContent 题源联想：json
         */
        public Builder associationContent(Integer[] associationContent) {
            obj.setAssociationContent(associationContent);
            return this;
        }

        /**
         * 设置总作答时间
         *
         * @param totalTime 总作答时间
         */
        public Builder totalTime(Integer totalTime) {
            obj.setTotalTime(totalTime);
            return this;
        }

        /**
         * 设置总作答次数
         *
         * @param totalNumber 总作答次数
         */
        public Builder totalNumber(Integer totalNumber) {
            obj.setTotalNumber(totalNumber);
            return this;
        }

        /**
         * 设置总正确次数
         *
         * @param totalCorrect 总正确次数
         */
        public Builder totalCorrect(Integer totalCorrect) {
            obj.setTotalCorrect(totalCorrect);
            return this;
        }

        /**
         * @param createTime
         */
        public Builder createTime(Date createTime) {
            obj.setCreateTime(createTime);
            return this;
        }

        /**
         * @param updateTime
         */
        public Builder updateTime(Date updateTime) {
            obj.setUpdateTime(updateTime);
            return this;
        }

        /**
         * 设置题干
         *
         * @param stem 题干
         */
        public Builder stem(String stem) {
            obj.setStem(stem);
            return this;
        }

        /**
         * @param qxContent
         */
        public Builder qxContent(String qxContent) {
            obj.setQxContent(qxContent);
            return this;
        }

        /**
         * @param officialContent
         */
        public Builder officialContent(String officialContent) {
            obj.setOfficialContent(officialContent);
            return this;
        }

        public Question build() {
            return this.obj;
        }
    }
}