package com.luojia_channel.modules.search.entity;


import lombok.Data;
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.time.LocalDateTime;


@Data
@Document(indexName = "post_index")
public class EsPost {
    @Id
    private Long id;

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String title;

    private String image;

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String content;

    private Integer status;
    private Integer likeCount;
    private Integer commentCount;
    private Integer favoriteCount;
    private Integer viewCount;
    private Long userId;
    private Long categoryId;

    private LocalDateTime createTime;
}
