package com.qxgmat.data.dao.entity;

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

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

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

    /**
     * 题目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 = "`status`")
    private Integer status;

    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 paper_id - 练习册：组卷id
     */
    public Integer getPaperId() {
        return paperId;
    }

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

    /**
     * 获取题目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 status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    @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(", paperId=").append(paperId);
        sb.append(", questionId=").append(questionId);
        sb.append(", questionNoId=").append(questionNoId);
        sb.append(", no=").append(no);
        sb.append(", status=").append(status);
        sb.append("]");
        return sb.toString();
    }

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

    public static class Builder {
        private ExercisePaperQuestion obj;

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

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

        /**
         * 设置练习册：组卷id
         *
         * @param paperId 练习册：组卷id
         */
        public Builder paperId(Integer paperId) {
            obj.setPaperId(paperId);
            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 status
         */
        public Builder status(Integer status) {
            obj.setStatus(status);
            return this;
        }

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