首页>代码>vue搭建个人博客后台代码>/blog/boot-gbq-dao/src/main/java/com/gbq/boot/web/bean/Article.java
package com.gbq.boot.web.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @author aqian666
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("blog_article")
@Document(indexName = "article",type = "docs", shards = 1, replicas = 0)
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 文章标题
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    @TableField("articleName")
    private String articleName;

    /**
     * 文章封面
     */
    @Field(type = FieldType.Text)
    @TableField("articleHeadPic")
    private String articleHeadPic;

    /**
     * 文章标签
     */
    @Field(type = FieldType.Keyword)
    @TableField("articleTag")
    private String articleTag;

    /**
     * 文章备注
     */
    @Field(type = FieldType.Keyword)
    @TableField("articleRemark")
    private String articleRemark;

    /**
     * 文章阅读量
     */
    @TableField("articleReadCount")
    private Integer articleReadCount;

    /**
     * 文章审核状态
     */
    @Field(type = FieldType.Integer)
    @TableField("articleState")
    private Integer articleState;

    /**
     * 文章内容
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    @TableField("articleContent")
    private String articleContent;

    /**
     * 文章作者id
     */
    @Field(type = FieldType.Integer)
    @TableField("managerId")
    private Integer managerId;

    /**
     * 作者名称
     */
    @Field(type = FieldType.Keyword)
    @TableField("managerName")
    private String managerName;

    /**
     *创建时间
     */
    @Field(type = FieldType.Keyword)
    @TableField(value = "createTime",fill = FieldFill.INSERT)
    private String createTime;

    @TableField("articleType")
    private Integer articleType;

    @TableField("articleStarNum")
    private Integer articleStarNum;

    @TableField("articleConNum")
    private Integer articleConNum;

    /**
     * 最新
     */
    @TableField(exist=false)
    private boolean latest;
    /**
     * 点赞
     */
    @TableField(exist=false)
    private boolean favorite;
    /**
     * 评论
     */
    @TableField(exist=false)
    private boolean commentMost;
    /**
     * 阅读
     */
    @TableField(exist=false)
    private boolean recommend;

    public String[] getTags(){
        if (articleTag != null){
            String[] split = articleTag.split(",");
            return  split;
        }
        return null;
    }



}
最近下载更多
dane168  LV10 10月19日
chenranr  LV10 2024年6月15日
hello_jugg  LV7 2023年10月31日
996171721  LV7 2023年9月24日
唐唐丶  LV34 2022年10月11日
hdell65  LV6 2022年10月7日
mx15574  LV6 2022年9月26日
testuser1234567  LV24 2022年8月31日
PKanor  LV3 2022年7月3日
lb1201  LV2 2022年6月23日
最近浏览更多
冰枫xjz8  LV31 11月28日
dane168  LV10 10月19日
周 敬博  LV2 6月6日
zdh3907  LV15 4月23日
zyfile  LV1 1月13日
叫我上帝  LV2 2024年12月23日
11999333  LV3 2024年12月23日
张春青  LV6 2024年12月17日
zolscy  LV24 2024年12月9日
tiancj  LV1 2024年11月25日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友