package com.mortals.xhx.module.feedback.model;
import java.util.List;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.feedback.model.vo.FeedbackQuestionVo;
import com.mortals.xhx.module.feedback.model.FeedbackOptionEntity;
import lombok.Data;
/**
* 绩效反馈问题实体对象
*
* @author zxfei
* @date 2023-07-05
*/
@Data
public class FeedbackQuestionEntity extends FeedbackQuestionVo {
    private static final long serialVersionUID = 1L;

    /**
    * 反馈问卷id号
    */
    private Long feedbackId;
    /**
    * 问题内容
    */
    private String content;
    /**
    * 问题类型 (1.单项选择,2.多项选择,3.文本框,4.多项文本框,5.文字,6.上传附件)
    */
    private Integer questionType;
    /**
    * 是否必填(0.否,1.是)
    */
    private Integer require;
    /**
    * 样式
    */
    private String style;
    /**
    * 备注
    */
    private String remark;
    /**
    * 绩效问题选项信息
    */
    private List<FeedbackOptionEntity> feedbackOptionList=new ArrayList<>();;
    public List<FeedbackOptionEntity> getFeedbackOptionList(){
      return feedbackOptionList;
    }

    public void setFeedbackOptionList(List<FeedbackOptionEntity> feedbackOptionList){
        this.feedbackOptionList = feedbackOptionList;
    }
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof FeedbackQuestionEntity) {
            FeedbackQuestionEntity tmp = (FeedbackQuestionEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

            this.feedbackId = 0L;

            this.content = "";

            this.questionType = 1;

            this.require = 0;

            this.style = "";

            this.remark = "";
    }
}