From 1abc3672fed4c3f481600bc9f9812ff737fb6037 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Mon, 2 Dec 2024 15:15:14 +0800 Subject: [PATCH] pdate --- md/es.go | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/md/es.go b/md/es.go index 9f2bea2..0c0cabe 100644 --- a/md/es.go +++ b/md/es.go @@ -97,3 +97,114 @@ type EggEnergyUserEggScoreEs struct { CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` } + +const EggFriendCircleEsAlias = "egg_friend_circle" +const EggFriendCircleEsIndex = "egg_friend_circle_1" +const EggFriendCircleEsMapping = ` +{ + "settings" : { + "number_of_shards" : 2, + "number_of_replicas" : 1 + }, + "aliases": { + "egg_friend_circle": {} + }, + "mappings":{ + "properties":{ + "uid":{ + "type": "integer" + }, + "kind":{ + "type": "short" + }, + "content":{ + "type": "text", + "analyzer": "ik_smart" + }, + "image":{ + "type": "keyword" + }, + "video":{ + "type": "keyword" + }, + "likes_nums":{ + "type": "integer" + }, + "comment_nums":{ + "type": "integer" + }, + "share_nums":{ + "type": "integer" + }, + "state":{ + "type": "short" + }, + "is_top_up":{ + "type": "short" + }, + "created_at":{ + "type": "date", + "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis" + }, + "updated_at":{ + "type": "date", + "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis" + } + } + } +}` + +type EggFriendCircleEs struct { + Uid int64 `json:"uid" label:"uid"` + Kind int32 `json:"kind" label:"类型(1:普通 2:官方)"` + Content string `json:"content" label:"文本内容"` + Image string `json:"image" label:"图片"` + Video string `json:"video" label:"视频"` + LikesNums int `json:"likes_nums" label:"点赞数"` + ShareNums int `json:"share_nums" label:"分享数"` + CommentNums int `json:"comment_nums" label:"评论数"` + Sate int32 `json:"state" label:"状态(1:正常 2:隐藏)"` + IsTopUp int32 `json:"is_top_up" label:"是否置顶(1:是 2:否)"` + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` +} + +const EggFriendCircleCommentEsAlias = "egg_friend_circle_comment" +const EggFriendCircleCommentEsIndex = "egg_friend_circle_comment_1" +const EggFriendCircleCommentEsMapping = ` +{ + "settings" : { + "number_of_shards" : 2, + "number_of_replicas" : 1 + }, + "aliases": { + "egg_friend_circle_comment": {} + }, + "mappings":{ + "properties":{ + "uid":{ + "type": "integer" + }, + "circle_id":{ + "type": "integer" + }, + "content":{ + "type": "keyword", + }, + "kind":{ + "type": "short", + }, + "state":{ + "type": "short" + }, + "created_at":{ + "type": "date", + "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis" + }, + "updated_at":{ + "type": "date", + "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis" + } + } + } +}`