package com.gxwebsoft.cms.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 文章评论表
 *
 * @author 科技小王子
 * @since 2023-07-07 14:14:35
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ArticleComment对象", description = "文章评论表")
@TableName("cms_article_comment")
public class ArticleComment implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "评价ID")
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Integer commentId;

    @ApiModelProperty(value = "评分 (10好评 20中评 30差评)")
    private Integer score;

    @ApiModelProperty(value = "评价内容")
    private String content;

    @ApiModelProperty(value = "是否为图片评价")
    private Integer isPicture;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "回复的评论ID")
    private Integer replyCommentId;

    @ApiModelProperty(value = "回复者ID")
    private Integer replyUserId;

    @ApiModelProperty(value = "被评论者ID")
    private Integer toUserId;

    @ApiModelProperty(value = "文章ID")
    private Integer articleId;

    @ApiModelProperty(value = "排序(数字越小越靠前)")
    private Integer sortNumber;

    @ApiModelProperty(value = "备注")
    private String comments;

    @ApiModelProperty(value = "状态, 0正常, 1冻结")
    private Integer status;

    @ApiModelProperty(value = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "商户编码")
    private String merchantCode;

    @ApiModelProperty(value = "租户id")
    private Integer tenantId;

    @ApiModelProperty(value = "注册时间")
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    @ApiModelProperty(value = "评论者昵称")
    @TableField(exist = false)
    private String nickname;

    @ApiModelProperty(value = "评论者头像")
    @TableField(exist = false)
    private String avatar;

    @ApiModelProperty(value = "评论条数")
    @TableField(exist = false)
    private Integer countComment;

    @ApiModelProperty(value = "评论者粉丝数")
    @TableField(exist = false)
    private Integer fans;

    @ApiModelProperty(value = "是否已点赞")
    @TableField(exist = false)
    private Integer liked;

    @ApiModelProperty(value = "评论者获赞数")
    @TableField(exist = false)
    private Boolean likes;

    @ApiModelProperty(value = "评论者所在省份")
    @TableField(exist = false)
    private String province;

    @ApiModelProperty(value = "评论者所在城市")
    @TableField(exist = false)
    private String city;

    @ApiModelProperty(value = "被评论者昵称")
    @TableField(exist = false)
    private String toUserNickname;

    @ApiModelProperty(value = "被评论者头像")
    @TableField(exist = false)
    private String toUserAvatar;

    @ApiModelProperty(value = "被评论者粉丝数")
    @TableField(exist = false)
    private Integer toUserFans;

    @ApiModelProperty(value = "被评论者所在省份")
    @TableField(exist = false)
    private String toUserProvince;

    @ApiModelProperty(value = "被评论者所在城市")
    @TableField(exist = false)
    private String toUserCity;

    @ApiModelProperty(value = "被评论者获赞数")
    @TableField(exist = false)
    private Integer toUserLikes;

    @ApiModelProperty(value = "回复者昵称")
    @TableField(exist = false)
    private String replyNickname;

    @ApiModelProperty(value = "回复者头像")
    @TableField(exist = false)
    private String replyAvatar;

    @ApiModelProperty(value = "回复者粉丝数")
    @TableField(exist = false)
    private Integer replyFans;

    @ApiModelProperty(value = "子评论列表")
    @TableField(exist = false)
    private List<ArticleComment> children;

}
