package cn.bunny.vo.system.comment;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class CommentVo {
    // 评论ID
    private Long id;
    // 父级评论ID
    private Integer pCommentId;
    // 文章ID
    private String articleId;
    // 回复内容
    private String content;
    // 图片
    private String imgPath;
    // 用户ID
    private Long userId;
    // 昵称
    private String nickName;
    // 用户ip地址
    private String userIpAddress;
    // 回复人ID
    private Long replyUserId;
    // 回复人昵称
    private String replyNickName;
    // 0:未置顶  1:置顶
    private Byte topType;
    // 发布时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime postTime;
    // good数量
    private Integer goodCount;
    // 0:待审核  1:已审核
    private Byte status;
    private List<CommentVo> children;
}
