package com.mortals.xhx.module.matter.model;

import com.mortals.xhx.module.matter.model.vo.MatterQuestionVo;
/**
* 事项常见问题实体对象
*
* @author zxfei
* @date 2022-11-16
*/

public class MatterQuestionEntity extends MatterQuestionVo {
    private static final long serialVersionUID = 1L;

    /**
    * 事项基础表matter id
    */
    private Long matterId;
    /**
    * 事项编码
    */
    private String matterCode;
    /**
    * 事项名称
    */
    private String matterName;
    /**
    * 问题
    */
    private String question;
    /**
    * 常见问题
    */
    private String answer;
    /**
    * 事项来源，(0.政务网，1.自定义)
    */
    private Integer source;



    public MatterQuestionEntity(){}
    /**
    * 获取 事项基础表matter id
    * @return Long
    */
    public Long getMatterId(){
        return matterId;
    }
    /**
    * 设置 事项基础表matter id
    * @param matterId
    */
    public void setMatterId(Long matterId){
        this.matterId = matterId;
    }
    /**
    * 获取 事项编码
    * @return String
    */
    public String getMatterCode(){
        return matterCode;
    }
    /**
    * 设置 事项编码
    * @param matterCode
    */
    public void setMatterCode(String matterCode){
        this.matterCode = matterCode;
    }
    /**
    * 获取 事项名称
    * @return String
    */
    public String getMatterName(){
        return matterName;
    }
    /**
    * 设置 事项名称
    * @param matterName
    */
    public void setMatterName(String matterName){
        this.matterName = matterName;
    }
    /**
    * 获取 问题
    * @return String
    */
    public String getQuestion(){
        return question;
    }
    /**
    * 设置 问题
    * @param question
    */
    public void setQuestion(String question){
        this.question = question;
    }
    /**
    * 获取 常见问题
    * @return String
    */
    public String getAnswer(){
        return answer;
    }
    /**
    * 设置 常见问题
    * @param answer
    */
    public void setAnswer(String answer){
        this.answer = answer;
    }
    /**
    * 获取 事项来源，(0.政务网，1.自定义)
    * @return Integer
    */
    public Integer getSource(){
        return source;
    }
    /**
    * 设置 事项来源，(0.政务网，1.自定义)
    * @param source
    */
    public void setSource(Integer source){
        this.source = source;
    }




    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof MatterQuestionEntity) {
            MatterQuestionEntity tmp = (MatterQuestionEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",matterId:").append(getMatterId());
        sb.append(",matterCode:").append(getMatterCode());
        sb.append(",matterName:").append(getMatterName());
        sb.append(",question:").append(getQuestion());
        sb.append(",answer:").append(getAnswer());
        sb.append(",source:").append(getSource());
        return sb.toString();
    }

    public void initAttrValue(){

            this.matterId = 0L;

            this.matterCode = "";

            this.matterName = "";

            this.question = "";

            this.answer = "";

            this.source = 0;
    }
}