package org.springblade.modules.mall.entity;

import org.springblade.common.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 评论表实体类
 *
 * @author zzyd
 * @since 2023-06-13
 */
@Data
@TableName("biz_comment")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Comment对象", description = "评论表")
public class Comment extends BaseEntity<Comment> {

	private static final long serialVersionUID = 1L;

	/**
	* 内容
	*/
	@ApiModelProperty(value = "内容")
	private String content;
	/**
	* 款式
	*/
	@ApiModelProperty(value = "款式")
	private String style;
	/**
	* 用户头像
	*/
	@ApiModelProperty(value = "用户头像")
	private String avatar;
	/**
	* 用户名称
	*/
	@ApiModelProperty(value = "用户名称")
	private String userName;
	/**
	* 点赞总数
	*/
	@ApiModelProperty(value = "点赞总数")
	private Integer likeTotal;
	/**
	* 评论回复总数
	*/
	@ApiModelProperty(value = "评论回复总数")
	private Integer recoverTotal;
	/**
	* 商品ID
	*/
	@ApiModelProperty(value = "商品ID")
	private Long goodsId;
	/**
	* 订单ID
	*/
	@ApiModelProperty(value = "订单ID")
	private Long orderId;
	/**
	* 是否有图
	*/
	@ApiModelProperty(value = "是否有图")
	private Integer isHavePicture;
	/**
	* 评分
	*/
	@ApiModelProperty(value = "评分")
	private Integer score;
	/**
	* 是否商家回复
	*/
	@ApiModelProperty(value = "是否商家回复")
	private Integer isMerchantReply;
	/**
	* 是否追评
	*/
	@ApiModelProperty(value = "是否追评")
	private Integer isAdditionalReview;

	@ApiModelProperty(value = "父评论ID")
	private Long parentId;

	public Integer getLikeTotal() {
		return likeTotal == null ? 0 : likeTotal;
	}

	public Integer getRecoverTotal() {
		return recoverTotal == null ? 0 : recoverTotal;
	}
}
