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

import com.fasterxml.jackson.annotation.JsonFormat;

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

/**
 * 评论前端所需要格式主体的子集，子集里面是回复的人和被回复的人
 * @Author: tjf
 * @Date: 2025/2/25 15:55
 * @Describe:
 */
public class CommentChildrenVo 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 TargetUser targetUser;

    /**
     * 内容
     */
    private String content;
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 点赞数量
     */
    private Integer likeCount;
    /**
     * 当前人员是否点赞
     */
    private String isLike;
    /**
     * 是否是二级回复的回复 Y:是 N:否
     */
    private String toRoot;
    /**
     * 是否是自己的评论 Y：是 N：否
     */
    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 String getToRoot() {
        return toRoot;
    }

    public void setToRoot(String toRoot) {
        this.toRoot = toRoot;
    }

    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 TargetUser getTargetUser() {
        return targetUser;
    }

    public void setTargetUser(TargetUser targetUser) {
        this.targetUser = targetUser;
    }

    public String getContent() {
        return content;
    }

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

    public Date getCreateTime() {
        return createTime;
    }

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

    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;
    }


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