package com.mortals.xhx.module.feedback.model;
import java.util.List;
import java.util.Date;
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.FeedbackVo;
import com.mortals.xhx.module.feedback.model.FeedbackQuestionEntity;
import lombok.Data;
/**
 * 绩效反馈记录信息实体对象
 *
 * @author zxfei
 * @date 2023-07-18
 */
@Data
public class FeedbackEntity extends FeedbackVo {
    private static final long serialVersionUID = 1L;

    /**
     * 问卷标题
     */
    private String title;
    /**
     * 反馈开始时间
     */
    private Date feedbackTimeStart;
    /**
     * 反馈结束时间
     */
    private Date feedbackTimeEnd;
    /**
     * 邀请人数
     */
    private Integer inviteNum;
    /**
     * 反馈人数
     */
    private Integer feedbackNum;
    /**
     * 状态 (0.未开始,1.进行中,2.已结束)
     */
    private Integer processStatus;
    /**
     * 问卷是否外链(0.否,1.是)
     */
    private Integer weblink;
    /**
     * 问题外链地址
     */
    private String webUrl;
    /**
     * 备注说明
     */
    private String remark;
    /**
     * 表单内容
     */
    private String formContent;
    /**
     * 规则内容
     */
    private String ruleContent;
    /**
     * 图片id
     */
    private Long feedbackFileId;
    /**
     * 图片路径
     */
    private String feedbackFilePath;
    /**
     * 绩效反馈问题信息
     */
    private List<FeedbackQuestionEntity> feedbackQuestionList=new ArrayList<>();;
    public List<FeedbackQuestionEntity> getFeedbackQuestionList(){
        return feedbackQuestionList;
    }

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

    public void initAttrValue(){

        this.title = "";

        this.feedbackTimeStart = null;

        this.feedbackTimeEnd = null;

        this.inviteNum = 0;

        this.feedbackNum = 0;

        this.processStatus = 0;

        this.weblink = 0;

        this.webUrl = "";

        this.remark = "";

        this.formContent = "";

        this.ruleContent = "";

        this.feedbackFileId = -1L;

        this.feedbackFilePath = "";
    }
}