package com.slodon.b2b2c.vo.video;

import com.slodon.b2b2c.video.pojo.SvideoComment;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 *
 * 封装评论VO对象
 * @author wuxy
 */
@Data
public class CommentVO implements Serializable {

    private static final long serialVersionUID = 3323340450069639859L;
    @ApiModelProperty("评论id")
    private Integer commentId;

    @ApiModelProperty("评论人id")
    private Integer authorId;

    @ApiModelProperty("评论人名称")
    private String authorName;

    @ApiModelProperty("评论内容")
    private String content;

    @ApiModelProperty("评论时间")
    private Date createTime;

    @ApiModelProperty("点赞数")
    private Integer likeNum;

    public CommentVO(SvideoComment svideoComment) {
        this.commentId = svideoComment.getCommentId();
        this.authorId = svideoComment.getFromAuthorId();
        this.authorName = svideoComment.getFromAuthorName();
        this.content = svideoComment.getContent();
        this.createTime = svideoComment.getCreateTime();
        this.likeNum = svideoComment.getLikeNum();
    }
}
