package com.gxwebsoft.cms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 点赞文章
 *
 * @author 科技小王子
 * @since 2023-07-07 13:00:03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ArticleLike对象", description = "点赞文章")
@TableName("cms_article_like")
public class ArticleLike implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

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

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

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

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

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

    @ApiModelProperty(value = "文章点赞数量")
    @TableField(exist = false)
    private Integer likes;

}
