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.FeedbackAnswerVo;
import com.mortals.xhx.module.feedback.model.FeedbackAnswerOptionEntity;
import lombok.Data;
/**
* 绩效问题回答实体对象
*
* @author zxfei
* @date 2023-07-05
*/
@Data
public class FeedbackAnswerEntity extends FeedbackAnswerVo {
    private static final long serialVersionUID = 1L;

    /**
    * 反馈问卷id号
    */
    private Long feedbackId;
    /**
    * 问题id号
    */
    private Long questionId;
    /**
    * 用户id号
    */
    private Long staffId;
    /**
    * 问题类型 (1.单项选择,2.多项选择,3.文本框,4.多项文本框,5.文字,6.上传附件)
    */
    private Integer questionType;
    /**
    * 适用于问题内容为文本内容
    */
    private String content;
    /**
    * 备注
    */
    private String remark;
    /**
    * 绩效问题回答选项信息
    */
    private List<FeedbackAnswerOptionEntity> feedbackAnswerOptionList=new ArrayList<>();;
    public List<FeedbackAnswerOptionEntity> getFeedbackAnswerOptionList(){
      return feedbackAnswerOptionList;
    }

    public void setFeedbackAnswerOptionList(List<FeedbackAnswerOptionEntity> feedbackAnswerOptionList){
        this.feedbackAnswerOptionList = feedbackAnswerOptionList;
    }
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof FeedbackAnswerEntity) {
            FeedbackAnswerEntity tmp = (FeedbackAnswerEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){

            this.feedbackId = 0L;

            this.questionId = 0L;

            this.staffId = 0L;

            this.questionType = 1;

            this.content = "";

            this.remark = "";
    }
}