package com.ruoyi.system.domain.communityNews.vo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 评论前端所需要格式主体
 * @Author: tjf
 * @Date: 2025/2/25 15:49
 * @Describe:
 */
public class CommentIndexVo implements Serializable {
    /**
     * [
     *         {
     *           id: 1,
     *           commentUser: {
     *             id: 1,
     *             nickName: "花非花",
     *             avatar:
     *               "http://qzapp.qlogo.cn/qzapp/101483738/6637A2B6611592A44A7699D14E13F7F7/50",
     *           },
     *           content:
     *             "<a style='text-decoration:none;color: #409eff ' href='https://blog.csdn.net/qq_40942490?spm=1000.2115.3001.5113'>我的CSDN博客地址</a>[害羞][害羞][害羞]<br/>",
     *           createDate: "2019-9-23 17:36:02",
     *           childrenList: [
     *             {
     *               id: 2,
     *               commentUser: {
     *                 id: 2,
     *                 nickName: "坏菠萝",
     *                 avatar: "",
     *               },
     *               targetUser: {
     *                 id: 1,
     *                 nickName: "花非花",
     *                 avatar:
     *                   "http://qzapp.qlogo.cn/qzapp/101483738/6637A2B6611592A44A7699D14E13F7F7/50",
     *               },
     *               content: "真的就很棒！很Nice![爱你]",
     *               createDate: "2019-9-23 17:45:26",
     *             },
     *           ],
     */
    private static final long serialVersionUID = 1L;

    /**
     * 评论主体id
     */
    private Long id;
    /**
     * 回复的人
     */
    private CommentUser commentUser;
    /**
     * 内容
     */
    private String content;
    /**
     * 点赞数量
     */
    private Integer likeCount;
    /**
     * 当前人员是否点赞
     */
    private String isLike;
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 评论子集
     */
    private List<CommentChildrenVo> childrenList;
    /**
     * 子集总数
     */
    private  Integer childrenListCount;

    /**
     * 是否是自己的评论
     */
    private String isMyself;
    /**
     * 根评论id 1:根评论 2：子评论
     */
    private String isRoot;

    public String getIsRoot() {
        return isRoot;
    }

    public void setIsRoot(String isRoot) {
        this.isRoot = isRoot;
    }

    public String getIsMyself() {
        return isMyself;
    }

    public void setIsMyself(String isMyself) {
        this.isMyself = isMyself;
    }

    public Integer getChildrenListCount() {
        return childrenListCount;
    }

    public void setChildrenListCount(Integer childrenListCount) {
        this.childrenListCount = childrenListCount;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public CommentUser getCommentUser() {
        return commentUser;
    }

    public void setCommentUser(CommentUser commentUser) {
        this.commentUser = commentUser;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(Integer likeCount) {
        this.likeCount = likeCount;
    }

    public String getIsLike() {
        return isLike;
    }

    public void setIsLike(String isLike) {
        this.isLike = isLike;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List<CommentChildrenVo> getChildrenList() {
        return childrenList;
    }

    public void setChildrenList(List<CommentChildrenVo> childrenList) {
        this.childrenList = childrenList;
    }

    @Override
    public String toString() {
        return "CommentIndexVo{" +
                "id=" + id +
                ", commentUser=" + commentUser +
                ", content='" + content + '\'' +
                ", likeCount=" + likeCount +
                ", isLike='" + isLike + '\'' +
                ", createTime=" + createTime +
                ", childrenList=" + childrenList +
                ", childrenListCount=" + childrenListCount +
                ", isMyself='" + isMyself + '\'' +
                ", isRoot='" + isRoot + '\'' +
                '}';
    }
}
