package com.ruoyi.generator.vo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
* 文章评价记录表
* @TableName community_article_comment
*/
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("community_article_comment")
public class CommunityArticleCommentVo extends BaseEntity implements Serializable {

    /**
    * 评论id
    */
    @NotNull(message="[评论id]不能为空")
    @ApiModelProperty("评论id")
    @TableId("id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
    * 文章id
    */
    @ApiModelProperty("文章id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long articleId;
    /**
    * 评论人id
    */
    @ApiModelProperty("评论人id")
    private Long userId;

    /**
     * 评论人昵称
     */
    @ApiModelProperty("评论人昵称")
    private String nickName;

    /**
     * 评论点赞数
     */
    @ApiModelProperty("评论点赞数")
    private int commentLikeCount;

    /**
     * 评论点赞数
     */
    @ApiModelProperty("当前用户是否已点赞")
    private boolean isCommentLike;

    /**
     * 评论人头像
     */
    @ApiModelProperty("评论人头像")
    private String avatar;

    /**
     * 评论内容
     */
    @ApiModelProperty("评论内容")
    private String content;

    /**
     * 评论首条回复
     */
    @ApiModelProperty("评论首条回复")
    private List<CommunityCommentReplyVo> firstReply;

    /**
     * 评论下回复总数
     */
    @ApiModelProperty("评论下回复剩余总数")
    private int replyCount;

    /**
     * 是否是回复
     */
    @ApiModelProperty("是否是回复")
    private boolean isReply;
}
