package com.qxgmat.data.dao.entity;

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

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

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

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

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

    /**
     * 模块标记：collect,error,remove_error
     */
    @Column(name = "`module`")
    private String module;

    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 paper_id - 分组id
     */
    public Integer getPaperId() {
        return paperId;
    }

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

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

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

    /**
     * 获取模块标记：collect,error,remove_error
     *
     * @return module - 模块标记：collect,error,remove_error
     */
    public String getModule() {
        return module;
    }

    /**
     * 设置模块标记：collect,error,remove_error
     *
     * @param module 模块标记：collect,error,remove_error
     */
    public void setModule(String module) {
        this.module = module;
    }

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

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

    public static class Builder {
        private UserPaperQuestion obj;

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

        /**
         * @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 paperId 分组id
         */
        public Builder paperId(Integer paperId) {
            obj.setPaperId(paperId);
            return this;
        }

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

        /**
         * 设置模块标记：collect,error,remove_error
         *
         * @param module 模块标记：collect,error,remove_error
         */
        public Builder module(String module) {
            obj.setModule(module);
            return this;
        }

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