package com.qxgmat.data.dao.entity;

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

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

    /**
     * 标题
     */
    @Column(name = "`title`")
    private String title;

    /**
     * 是否试用：0非试用，1试用
     */
    @Column(name = "`is_trail`")
    private Integer isTrail;

    /**
     * 组卷id
     */
    @Column(name = "`paper_id`")
    private Integer paperId;

    /**
     * 序号：手工录入
     */
    @Column(name = "`no`")
    private Integer no;

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

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

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

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

    /**
     * 中文语义
     */
    @Column(name = "`chinese`")
    private String chinese;

    private static final long serialVersionUID = 1L;

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

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

    /**
     * 获取标题
     *
     * @return title - 标题
     */
    public String getTitle() {
        return title;
    }

    /**
     * 设置标题
     *
     * @param title 标题
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 获取是否试用：0非试用，1试用
     *
     * @return is_trail - 是否试用：0非试用，1试用
     */
    public Integer getIsTrail() {
        return isTrail;
    }

    /**
     * 设置是否试用：0非试用，1试用
     *
     * @param isTrail 是否试用：0非试用，1试用
     */
    public void setIsTrail(Integer isTrail) {
        this.isTrail = isTrail;
    }

    /**
     * 获取组卷id
     *
     * @return paper_id - 组卷id
     */
    public Integer getPaperId() {
        return paperId;
    }

    /**
     * 设置组卷id
     *
     * @param paperId 组卷id
     */
    public void setPaperId(Integer paperId) {
        this.paperId = paperId;
    }

    /**
     * 获取序号：手工录入
     *
     * @return no - 序号：手工录入
     */
    public Integer getNo() {
        return no;
    }

    /**
     * 设置序号：手工录入
     *
     * @param no 序号：手工录入
     */
    public void setNo(Integer no) {
        this.no = no;
    }

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

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

    /**
     * 获取总作答时间
     *
     * @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 chinese - 中文语义
     */
    public String getChinese() {
        return chinese;
    }

    /**
     * 设置中文语义
     *
     * @param chinese 中文语义
     */
    public void setChinese(String chinese) {
        this.chinese = chinese;
    }

    @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(", title=").append(title);
        sb.append(", isTrail=").append(isTrail);
        sb.append(", paperId=").append(paperId);
        sb.append(", no=").append(no);
        sb.append(", questionId=").append(questionId);
        sb.append(", totalTime=").append(totalTime);
        sb.append(", totalNumber=").append(totalNumber);
        sb.append(", totalCorrect=").append(totalCorrect);
        sb.append(", chinese=").append(chinese);
        sb.append("]");
        return sb.toString();
    }

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

    public static class Builder {
        private SentenceQuestion obj;

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

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

        /**
         * 设置标题
         *
         * @param title 标题
         */
        public Builder title(String title) {
            obj.setTitle(title);
            return this;
        }

        /**
         * 设置是否试用：0非试用，1试用
         *
         * @param isTrail 是否试用：0非试用，1试用
         */
        public Builder isTrail(Integer isTrail) {
            obj.setIsTrail(isTrail);
            return this;
        }

        /**
         * 设置组卷id
         *
         * @param paperId 组卷id
         */
        public Builder paperId(Integer paperId) {
            obj.setPaperId(paperId);
            return this;
        }

        /**
         * 设置序号：手工录入
         *
         * @param no 序号：手工录入
         */
        public Builder no(Integer no) {
            obj.setNo(no);
            return this;
        }

        /**
         * 设置题目id
         *
         * @param questionId 题目id
         */
        public Builder questionId(Integer questionId) {
            obj.setQuestionId(questionId);
            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 chinese 中文语义
         */
        public Builder chinese(String chinese) {
            obj.setChinese(chinese);
            return this;
        }

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