package com.qxgmat.data.dao.entity;

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

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

    /**
     * 用户id
     */
    @Column(name = "`user_id`")
    private Integer userId;

    /**
     * 报告id
     */
    @Column(name = "`report_id`")
    private Integer reportId;

    /**
     * 题目id
     */
    @Column(name = "`question_id`")
    private Integer questionId;

    /**
     * 题目编号id
     */
    @Column(name = "`question_no_id`")
    private Integer questionNoId;

    /**
     * 做题序号
     */
    @Column(name = "`no`")
    private Integer no;

    /**
     * 系统定义时间
     */
    @Column(name = "`time`")
    private Integer time;

    /**
     * 用户用时
     */
    @Column(name = "`user_time`")
    private Integer userTime;

    /**
     * 用户答案：json
     */
    @Column(name = "`user_answer`")
    private JSONObject userAnswer;

    /**
     * 正确：0错误，1正确
     */
    @Column(name = "`is_correct`")
    private Integer isCorrect;

    /**
     * 详细信息：长难句逻辑、结构
     */
    @Column(name = "`detail`")
    private JSONObject detail;

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

    private static final long serialVersionUID = 1L;

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

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

    /**
     * 获取用户id
     *
     * @return user_id - 用户id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 设置用户id
     *
     * @param userId 用户id
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 获取报告id
     *
     * @return report_id - 报告id
     */
    public Integer getReportId() {
        return reportId;
    }

    /**
     * 设置报告id
     *
     * @param reportId 报告id
     */
    public void setReportId(Integer reportId) {
        this.reportId = reportId;
    }

    /**
     * 获取题目id
     *
     * @return question_id - 题目id
     */
    public Integer getQuestionId() {
        return questionId;
    }

    /**
     * 设置题目id
     *
     * @param questionId 题目id
     */
    public void setQuestionId(Integer questionId) {
        this.questionId = questionId;
    }

    /**
     * 获取题目编号id
     *
     * @return question_no_id - 题目编号id
     */
    public Integer getQuestionNoId() {
        return questionNoId;
    }

    /**
     * 设置题目编号id
     *
     * @param questionNoId 题目编号id
     */
    public void setQuestionNoId(Integer questionNoId) {
        this.questionNoId = questionNoId;
    }

    /**
     * 获取做题序号
     *
     * @return no - 做题序号
     */
    public Integer getNo() {
        return no;
    }

    /**
     * 设置做题序号
     *
     * @param no 做题序号
     */
    public void setNo(Integer no) {
        this.no = no;
    }

    /**
     * 获取系统定义时间
     *
     * @return time - 系统定义时间
     */
    public Integer getTime() {
        return time;
    }

    /**
     * 设置系统定义时间
     *
     * @param time 系统定义时间
     */
    public void setTime(Integer time) {
        this.time = time;
    }

    /**
     * 获取用户用时
     *
     * @return user_time - 用户用时
     */
    public Integer getUserTime() {
        return userTime;
    }

    /**
     * 设置用户用时
     *
     * @param userTime 用户用时
     */
    public void setUserTime(Integer userTime) {
        this.userTime = userTime;
    }

    /**
     * 获取用户答案：json
     *
     * @return user_answer - 用户答案：json
     */
    public JSONObject getUserAnswer() {
        return userAnswer;
    }

    /**
     * 设置用户答案：json
     *
     * @param userAnswer 用户答案：json
     */
    public void setUserAnswer(JSONObject userAnswer) {
        this.userAnswer = userAnswer;
    }

    /**
     * 获取正确：0错误，1正确
     *
     * @return is_correct - 正确：0错误，1正确
     */
    public Integer getIsCorrect() {
        return isCorrect;
    }

    /**
     * 设置正确：0错误，1正确
     *
     * @param isCorrect 正确：0错误，1正确
     */
    public void setIsCorrect(Integer isCorrect) {
        this.isCorrect = isCorrect;
    }

    /**
     * 获取详细信息：长难句逻辑、结构
     *
     * @return detail - 详细信息：长难句逻辑、结构
     */
    public JSONObject getDetail() {
        return detail;
    }

    /**
     * 设置详细信息：长难句逻辑、结构
     *
     * @param detail 详细信息：长难句逻辑、结构
     */
    public void setDetail(JSONObject detail) {
        this.detail = detail;
    }

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

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

    @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(", userId=").append(userId);
        sb.append(", reportId=").append(reportId);
        sb.append(", questionId=").append(questionId);
        sb.append(", questionNoId=").append(questionNoId);
        sb.append(", no=").append(no);
        sb.append(", time=").append(time);
        sb.append(", userTime=").append(userTime);
        sb.append(", userAnswer=").append(userAnswer);
        sb.append(", isCorrect=").append(isCorrect);
        sb.append(", detail=").append(detail);
        sb.append(", createTime=").append(createTime);
        sb.append("]");
        return sb.toString();
    }

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

    public static class Builder {
        private UserQuestion obj;

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

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

        /**
         * 设置用户id
         *
         * @param userId 用户id
         */
        public Builder userId(Integer userId) {
            obj.setUserId(userId);
            return this;
        }

        /**
         * 设置报告id
         *
         * @param reportId 报告id
         */
        public Builder reportId(Integer reportId) {
            obj.setReportId(reportId);
            return this;
        }

        /**
         * 设置题目id
         *
         * @param questionId 题目id
         */
        public Builder questionId(Integer questionId) {
            obj.setQuestionId(questionId);
            return this;
        }

        /**
         * 设置题目编号id
         *
         * @param questionNoId 题目编号id
         */
        public Builder questionNoId(Integer questionNoId) {
            obj.setQuestionNoId(questionNoId);
            return this;
        }

        /**
         * 设置做题序号
         *
         * @param no 做题序号
         */
        public Builder no(Integer no) {
            obj.setNo(no);
            return this;
        }

        /**
         * 设置系统定义时间
         *
         * @param time 系统定义时间
         */
        public Builder time(Integer time) {
            obj.setTime(time);
            return this;
        }

        /**
         * 设置用户用时
         *
         * @param userTime 用户用时
         */
        public Builder userTime(Integer userTime) {
            obj.setUserTime(userTime);
            return this;
        }

        /**
         * 设置用户答案：json
         *
         * @param userAnswer 用户答案：json
         */
        public Builder userAnswer(JSONObject userAnswer) {
            obj.setUserAnswer(userAnswer);
            return this;
        }

        /**
         * 设置正确：0错误，1正确
         *
         * @param isCorrect 正确：0错误，1正确
         */
        public Builder isCorrect(Integer isCorrect) {
            obj.setIsCorrect(isCorrect);
            return this;
        }

        /**
         * 设置详细信息：长难句逻辑、结构
         *
         * @param detail 详细信息：长难句逻辑、结构
         */
        public Builder detail(JSONObject detail) {
            obj.setDetail(detail);
            return this;
        }

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

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