package cn.meowrain.aioj.backend.blogservice.dto.resp;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 评论响应DTO
 *
 * @author AIOJ
 */
@Data
@Schema(description = "评论响应")
public class CommentResponseDTO {

    @Schema(description = "评论ID", example = "1")
    private Long id;

    @Schema(description = "文章ID", example = "1")
    private Long articleId;

    @Schema(description = "评论用户ID", example = "1")
    private Long userId;

    @Schema(description = "评论用户名", example = "admin")
    private String userName;

    @Schema(description = "评论用户头像", example = "https://example.com/avatar.jpg")
    private String userAvatar;

    @Schema(description = "父评论ID", example = "0")
    private Long parentId;

    @Schema(description = "回复的评论ID", example = "0")
    private Long replyToId;

    @Schema(description = "回复的用户名", example = "user1")
    private String replyToName;

    @Schema(description = "评论内容", example = "这篇文章写得很好！")
    private String content;

    @Schema(description = "渲染后的HTML内容")
    private String contentHtml;

    @Schema(description = "点赞数", example = "5")
    private Integer likeCount;

    @Schema(description = "回复数", example = "2")
    private Integer replyCount;

    @Schema(description = "是否为作者评论", example = "1")
    private Integer isAuthor;

    @Schema(description = "状态", example = "1")
    private Integer status;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "当前用户是否点赞", example = "false")
    private Boolean isLiked;

    @Schema(description = "子评论列表")
    private List<CommentResponseDTO> children;
}
