package com.mortals.xhx.module.product.model;
import java.util.List;
import java.util.ArrayList;
import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.vo.ProductQuestionVo;
import lombok.Data;
/**
* 产品常见问题实体对象
*
* @author zxfei
* @date 2023-09-18
*/
@Data
public class ProductQuestionEntity extends ProductQuestionVo {
    private static final long serialVersionUID = 1L;

    /**
    * 产品id
    */
    private Long productId;
    /**
    * 产品名称
    */
    private String productName;
    /**
    * 问题
    */
    private String question;
    /**
    * 常见问题回答
    */
    private String answer;
    @Override
    public int hashCode() {
         return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof ProductQuestionEntity) {
            ProductQuestionEntity tmp = (ProductQuestionEntity) obj;
            if (this.getId() == tmp.getId()) {
                 return true;
            }
        }
        return false;
    }

    public void initAttrValue(){
            this.productId = 0L;
            this.productName = "";
            this.question = "";
            this.answer = "";
    }
}