package com.mcwl.resource.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * 评论区评论
 */

@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@ApiModel(description = "评论区评论")
public class ModelCommentVo {

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    private String userName;

    /**
     * 用户头像
     */
    @ApiModelProperty(value = "用户头像")
    private String userAvatar;

    /**
     * 评论id
     */
    @ApiModelProperty(value = "评论id")
    private Long commentId;

    /**
     * 评论内容
     */
    @ApiModelProperty(value = "评论内容")
    private String content;

    /**
     * 回复人
     */
    @ApiModelProperty(value = "回复人")
    private Long replyUserId;

    /**
     * 子评论
     */
    @ApiModelProperty(value = "子评论")
    private List<ModelCommentVo> contentList = new ArrayList<>();

    /**
     * 评论点赞数
     */
    @ApiModelProperty(value = "评论点赞数")
    private Integer likeNum;

    /**
     * 是否点赞
     */
    private Integer isLike;

    /**
     * 评论时间
     */
    @ApiModelProperty(value = "评论时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
