package com.qxgmat.data.dao.entity;

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

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

    /**
     * 题目编号ids：json
     */
    @Column(name = "`question_no_ids`")
    private Integer[] questionNoIds;

    @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;
    }

    /**
     * 获取题目编号ids：json
     *
     * @return question_no_ids - 题目编号ids：json
     */
    public Integer[] getQuestionNoIds() {
        return questionNoIds;
    }

    /**
     * 设置题目编号ids：json
     *
     * @param questionNoIds 题目编号ids：json
     */
    public void setQuestionNoIds(Integer[] questionNoIds) {
        this.questionNoIds = questionNoIds;
    }

    /**
     * @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(", questionNoIds=").append(questionNoIds);
        sb.append(", createTime=").append(createTime);
        sb.append("]");
        return sb.toString();
    }

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

    public static class Builder {
        private TextbookPaper obj;

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

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

        /**
         * 设置题目编号ids：json
         *
         * @param questionNoIds 题目编号ids：json
         */
        public Builder questionNoIds(Integer[] questionNoIds) {
            obj.setQuestionNoIds(questionNoIds);
            return this;
        }

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

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