package com.ruoyi.post.controller.vo;

import com.ruoyi.post.frequency.postcomment.entity.PostComment;
import com.ruoyi.vo.UserInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 帖子评论对象 t_post_comment
 *
 * @author liwenlong
 * @date 2023-10-09
 */
@Data
@Accessors(chain = true)
public class SelectedComment
{

    @ApiModelProperty("租户号")
    private Long id;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("帖子id")
    private Long postId;

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

    @ApiModelProperty("图片")
    private String image;

    @ApiModelProperty("用户信息")
    private UserInfo userInfo;

    @ApiModelProperty(value = "是否精选评论 1 不是 2 是")
    private Integer isSelectedComment = 2;

    public SelectedComment(Integer isSelectedComment,PostComment postComment,UserInfo userInfo) {
        this.id = postComment.getId();
        this.userInfo = userInfo;
        this.postId = postComment.getPostId();
        this.content = postComment.getContent();
        this.image = postComment.getImage();
        this.createTime = postComment.getCreateTime();
        this.isSelectedComment = isSelectedComment;
    }

    public SelectedComment() {
    }
}
