xiangpei
4 天以前 d49707858ddd3ba73ded357bdaf8044c8b4b9c40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
package cn.lili.modules.lmk.domain.es;
 
import cn.lili.elasticsearch.EsSuffix;
import cn.lili.modules.lmk.domain.vo.SimpleVideoTagVO;
import cn.lili.modules.lmk.domain.vo.VideoGoodsDetailVO;
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.util.List;
 
/**
 * es的视频document(存储单元)
 *
 * @author:xp
 * @date:2025/6/30 14:50
 */
@Data
@Document(indexName = "#{@elasticsearchProperties.indexPrefix}_" + EsSuffix.VIDEO_INDEX_NAME, createIndex = false)
public class VideoIndex {
 
    /** 视频id */
    @Id
    private String id;
 
    /** 视频标题 */
    @Field(type = FieldType.Text, searchAnalyzer = "ik_max_word")
    private String title;
 
    /** 作者id */
    @Field(type = FieldType.Keyword)
    private String authorId;
 
    /** 作者名称 */
    @Field(type = FieldType.Text, searchAnalyzer = "ik_max_word")
    private String authorName;
 
    /** 作者头像 */
    @Field(type = FieldType.Keyword)
    private String authorAvatar;
 
    /** 封面 */
    @Field(type = FieldType.Keyword)
    private String coverFileKey;
 
    /** 视频地址 */
    @Field(type = FieldType.Keyword)
    private String videoFileKey;
 
    /**
     * 视频内容类型:视频、图片
     * @see cn.lili.modules.lmk.enums.general.VideoContentTypeEnum
     */
    @Field(type = FieldType.Keyword)
    private String videoContentType;
 
    /**
     * 视频类型:视频、大健康、神厨
     * @see cn.lili.modules.lmk.enums.general.VideoTypeEnum
     */
    @Field(type = FieldType.Keyword)
    private String videoType;
 
    /** 图集-json数组 */
    @Field(type = FieldType.Keyword)
    private String videoImgs;
 
    /** 视频标签 */
    @Field(type = FieldType.Nested)
    private List<SimpleVideoTagVO> tagList;
 
    /** 视频时长:秒 */
    @Field(type = FieldType.Keyword)
    private Long videoDuration;
 
    /** 视频填充模式 */
    @Field(type = FieldType.Keyword)
    private String videoFit;
 
    /** 视频状态 */
    @Field(type = FieldType.Keyword)
    private String status;
 
    /** 商品信息 */
    @Field(type = FieldType.Nested)
    private List<VideoGoodsDetailVO> goodsList;
 
    /** 是否推荐视频 */
    @Field(type = FieldType.Keyword)
    private boolean recommend = false;
 
}