package com.luojia_channel.modules.post.dto.resp;

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

import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(description = "评论信息")
public class CommentInfoDTO {
    @Schema(
            description = "评论id"
    )
    private Long id;

    @Schema(
            description = "评论内容",
            minLength = 1,
            maxLength = 500,
            example = "+3"
    )
    private String content;

    @Schema(
            description = "评论点赞数"
    )
    private Long likeCount;

    @Schema(
            description = "评论回复数"
    )
    private Long replyCount;

    @Schema(
            description = "评论用户id"
    )
    private Long userId;

    @Schema(
            description = "评论对应的帖子id"
    )
    private Long postId;

    @Schema(
            description = "评论对应的父级评论id"
    )
    private Long parentCommentId;

    @Schema(
            description = "评论对应的顶级评论id"
    )
    private Long topId;

    @Schema(
            description = "评论创建时间"
    )
    private LocalDateTime createTime;

    @Schema(
            description = "当前用户是否对评论点过赞,1-已点赞，0-未点赞",
            allowableValues = {"0", "1"},
            example = "1",
            implementation = Boolean.class
    )
    private Boolean isLike;

    private String userName;
    private String userAvatar;

    private String replyUserName;

    @Schema(
            description = "子评论列表"
    )
    private List<CommentInfoDTO> commentInfoDTOList; //当前返回空
}
