package com.qxgmat.data.dao.entity;

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

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

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

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

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

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

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

    /**
     * 获取用户id
     *
     * @return user_id - 用户id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 设置用户id
     *
     * @param userId 用户id
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

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

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

    /**
     * 获取题目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 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(", userId=").append(userId);
        sb.append(", module=").append(module);
        sb.append(", questionId=").append(questionId);
        sb.append(", questionNoId=").append(questionNoId);
        sb.append(", createTime=").append(createTime);
        sb.append("]");
        return sb.toString();
    }

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

    public static class Builder {
        private UserCollectQuestion obj;

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

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

        /**
         * 设置模块：exercise, examination, sentence
         *
         * @param module 模块：exercise, examination, sentence
         */
        public Builder module(String module) {
            obj.setModule(module);
            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 createTime
         */
        public Builder createTime(Date createTime) {
            obj.setCreateTime(createTime);
            return this;
        }

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