package com.qxgmat.data.dao.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

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

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

    /**
     * 模块：examination, exercise,sentence
     */
    @Column(name = "`module`")
    private String module;

    /**
     * 人工id
     */
    @Column(name = "`no`")
    private String no;

    /**
     * 对应模块结构信息，逗号分隔
     */
    @Column(name = "`module_struct`")
    private Integer[] moduleStruct;

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

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

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

    @Column(name = "`delete_time`")
    private Date deleteTime;

    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 question_id - 题目id
     */
    public Integer getQuestionId() {
        return questionId;
    }

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

    /**
     * 获取模块：examination, exercise,sentence
     *
     * @return module - 模块：examination, exercise,sentence
     */
    public String getModule() {
        return module;
    }

    /**
     * 设置模块：examination, exercise,sentence
     *
     * @param module 模块：examination, exercise,sentence
     */
    public void setModule(String module) {
        this.module = module;
    }

    /**
     * 获取人工id
     *
     * @return no - 人工id
     */
    public String getNo() {
        return no;
    }

    /**
     * 设置人工id
     *
     * @param no 人工id
     */
    public void setNo(String no) {
        this.no = no;
    }

    /**
     * 获取对应模块结构信息，逗号分隔
     *
     * @return module_struct - 对应模块结构信息，逗号分隔
     */
    public Integer[] getModuleStruct() {
        return moduleStruct;
    }

    /**
     * 设置对应模块结构信息，逗号分隔
     *
     * @param moduleStruct 对应模块结构信息，逗号分隔
     */
    public void setModuleStruct(Integer[] moduleStruct) {
        this.moduleStruct = moduleStruct;
    }

    /**
     * 获取总作答时间
     *
     * @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 delete_time
     */
    public Date getDeleteTime() {
        return deleteTime;
    }

    /**
     * @param deleteTime
     */
    public void setDeleteTime(Date deleteTime) {
        this.deleteTime = deleteTime;
    }

    @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(", questionId=").append(questionId);
        sb.append(", module=").append(module);
        sb.append(", no=").append(no);
        sb.append(", moduleStruct=").append(moduleStruct);
        sb.append(", totalTime=").append(totalTime);
        sb.append(", totalNumber=").append(totalNumber);
        sb.append(", totalCorrect=").append(totalCorrect);
        sb.append(", deleteTime=").append(deleteTime);
        sb.append("]");
        return sb.toString();
    }

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

    public static class Builder {
        private QuestionNo obj;

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

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

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

        /**
         * 设置模块：examination, exercise,sentence
         *
         * @param module 模块：examination, exercise,sentence
         */
        public Builder module(String module) {
            obj.setModule(module);
            return this;
        }

        /**
         * 设置对应模块结构信息，逗号分隔
         *
         * @param moduleStruct 对应模块结构信息，逗号分隔
         */
        public Builder moduleStruct(Integer[] moduleStruct) {
            obj.setModuleStruct(moduleStruct);
            return this;
        }

        /**
         * 设置人工id
         *
         * @param no 人工id
         */
        public Builder no(String no) {
            obj.setNo(no);
            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 deleteTime
         */
        public Builder deleteTime(Date deleteTime) {
            obj.setDeleteTime(deleteTime);
            return this;
        }

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