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;
|
|
}
|