package com.ruoyi.frequency.news.entity;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.vo.UserInfo;
import com.ruoyi.common.core.domain.BaseEntity;

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

/**
 * 新闻对象 t_news
 *
 * @author liwenlong
 * @date 2024-03-19
 */
@Data
@Accessors(chain = true)
@TableName("t_news")
public class News extends BaseEntity
{
    private static final long serialVersionUID = 1L;


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

    @ApiModelProperty("删除标志;1 正常 2 删除 3 禁用")
    private Long delFlag;

    @ApiModelProperty("标题")
    @Excel(name = "标题")
    private String title;

    @ApiModelProperty("图片")
    @Excel(name = "图片")
    private String image;


    @ApiModelProperty("内容(富文本)")
    private String content;

    @ApiModelProperty("父id;上级id")
    @Excel(name = "父id;上级id")
    private Long pid;

    @ApiModelProperty("排序")
    @Excel(name = "排序")
    private Integer sort;

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

    @ApiModelProperty("评论数")
    @Excel(name = "评论数")
    private Integer commentNum;

    @ApiModelProperty("收藏数")
    @Excel(name = "收藏数")
    private Integer collectNum;

    @ApiModelProperty("浏览数")
    @Excel(name = "浏览数")
    private Integer browseNum;

    @ApiModelProperty("精彩评论id")
    @Excel(name = "精彩评论id")
    private Long commentId;

    @ApiModelProperty(value = "是否点赞 1没有 2点赞")
    @TableField(exist = false)
    private Integer isLike;

    @ApiModelProperty(value = "是否收藏 1没有 2收藏")
    @TableField(exist = false)
    private Integer isCollect;

    @ApiModelProperty(value = "是否是自己 1不是 2是")
    @TableField(exist = false)
    private Integer isSelf;

    @ApiModelProperty("新闻子集")
    @TableField(exist = false)
    private List<News> childList;


    @ApiModelProperty("开始时间")
    @TableField(exist = false)
    private Date beginTime;

    @ApiModelProperty("结束时间")
    @TableField(exist = false)
    private Date endTime;
}
