package com.qxgmat.data.dao.entity;

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

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

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

    /**
     * 模块：题目模块
     */
    @Column(name = "`module`")
    private String module;

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

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

    /**
     * 问题对象：question，offical，qx，association
     */
    @Column(name = "`target`")
    private String target;

    /**
     * 回答状态: 0未回答，1回答，2忽略
     */
    @Column(name = "`answer_status`")
    private Integer answerStatus;

    /**
     * 回答人id
     */
    @Column(name = "`manager_id`")
    private Integer managerId;

    /**
     * 展示状态：0关闭，1打开
     */
    @Column(name = "`show_status`")
    private Integer showStatus;

    /**
     * 回答时间
     */
    @Column(name = "`answer_time`")
    private Date answerTime;

    /**
     * 排序：从大到小
     */
    @Column(name = "`order`")
    private Integer order;

    @Column(name = "`create_time`")
    private Date createTime;

    @Column(name = "`update_time`")
    private Date updateTime;

    /**
     * 提问
     */
    @Column(name = "`content`")
    private String content;

    /**
     * 回答
     */
    @Column(name = "`answer`")
    private String answer;

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

    /**
     * 获取模块：题目模块
     *
     * @return module - 模块：题目模块
     */
    public String getModule() {
        return module;
    }

    /**
     * 设置模块：题目模块
     *
     * @param module 模块：题目模块
     */
    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;
    }

    /**
     * 获取问题对象：question，offical，qx，association
     *
     * @return target - 问题对象：question，offical，qx，association
     */
    public String getTarget() {
        return target;
    }

    /**
     * 设置问题对象：question，offical，qx，association
     *
     * @param target 问题对象：question，offical，qx，association
     */
    public void setTarget(String target) {
        this.target = target;
    }

    /**
     * 获取回答状态: 0未回答，1回答，2忽略
     *
     * @return answer_status - 回答状态: 0未回答，1回答，2忽略
     */
    public Integer getAnswerStatus() {
        return answerStatus;
    }

    /**
     * 设置回答状态: 0未回答，1回答，2忽略
     *
     * @param answerStatus 回答状态: 0未回答，1回答，2忽略
     */
    public void setAnswerStatus(Integer answerStatus) {
        this.answerStatus = answerStatus;
    }

    /**
     * 获取回答人id
     *
     * @return manager_id - 回答人id
     */
    public Integer getManagerId() {
        return managerId;
    }

    /**
     * 设置回答人id
     *
     * @param managerId 回答人id
     */
    public void setManagerId(Integer managerId) {
        this.managerId = managerId;
    }

    /**
     * 获取展示状态：0关闭，1打开
     *
     * @return show_status - 展示状态：0关闭，1打开
     */
    public Integer getShowStatus() {
        return showStatus;
    }

    /**
     * 设置展示状态：0关闭，1打开
     *
     * @param showStatus 展示状态：0关闭，1打开
     */
    public void setShowStatus(Integer showStatus) {
        this.showStatus = showStatus;
    }

    /**
     * 获取回答时间
     *
     * @return answer_time - 回答时间
     */
    public Date getAnswerTime() {
        return answerTime;
    }

    /**
     * 设置回答时间
     *
     * @param answerTime 回答时间
     */
    public void setAnswerTime(Date answerTime) {
        this.answerTime = answerTime;
    }

    /**
     * 获取排序：从大到小
     *
     * @return order - 排序：从大到小
     */
    public Integer getOrder() {
        return order;
    }

    /**
     * 设置排序：从大到小
     *
     * @param order 排序：从大到小
     */
    public void setOrder(Integer order) {
        this.order = order;
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @return update_time
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * @param updateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取提问
     *
     * @return content - 提问
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置提问
     *
     * @param content 提问
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 获取回答
     *
     * @return answer - 回答
     */
    public String getAnswer() {
        return answer;
    }

    /**
     * 设置回答
     *
     * @param answer 回答
     */
    public void setAnswer(String answer) {
        this.answer = answer;
    }

    @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(", target=").append(target);
        sb.append(", answerStatus=").append(answerStatus);
        sb.append(", managerId=").append(managerId);
        sb.append(", showStatus=").append(showStatus);
        sb.append(", answerTime=").append(answerTime);
        sb.append(", order=").append(order);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", content=").append(content);
        sb.append(", answer=").append(answer);
        sb.append("]");
        return sb.toString();
    }

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

    public static class Builder {
        private UserAskQuestion obj;

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

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

        /**
         * 设置模块：题目模块
         *
         * @param module 模块：题目模块
         */
        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;
        }

        /**
         * 设置问题对象：question，offical，qx，association
         *
         * @param target 问题对象：question，offical，qx，association
         */
        public Builder target(String target) {
            obj.setTarget(target);
            return this;
        }

        /**
         * 设置回答
         *
         * @param answer 回答
         */
        public Builder answer(String answer) {
            obj.setAnswer(answer);
            return this;
        }

        /**
         * 设置回答状态: 0未回答，1回答，2忽略
         *
         * @param answerStatus 回答状态: 0未回答，1回答，2忽略
         */
        public Builder answerStatus(Integer answerStatus) {
            obj.setAnswerStatus(answerStatus);
            return this;
        }

        /**
         * 设置回答人id
         *
         * @param managerId 回答人id
         */
        public Builder managerId(Integer managerId) {
            obj.setManagerId(managerId);
            return this;
        }

        /**
         * 设置展示状态：0关闭，1打开
         *
         * @param showStatus 展示状态：0关闭，1打开
         */
        public Builder showStatus(Integer showStatus) {
            obj.setShowStatus(showStatus);
            return this;
        }

        /**
         * 设置回答时间
         *
         * @param answerTime 回答时间
         */
        public Builder answerTime(Date answerTime) {
            obj.setAnswerTime(answerTime);
            return this;
        }

        /**
         * 设置排序：从大到小
         *
         * @param order 排序：从大到小
         */
        public Builder order(Integer order) {
            obj.setOrder(order);
            return this;
        }

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

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

        /**
         * 设置提问
         *
         * @param content 提问
         */
        public Builder content(String content) {
            obj.setContent(content);
            return this;
        }

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