蛋蛋星球-制度模式
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

349 lines
9.5 KiB

  1. package md
  2. const (
  3. CommentLikeCacheKey = "comment:%s:like"
  4. CommentLikeCacheTime = 86400 * 30
  5. )
  6. const EggEnergyUserEggScoreEsAlias = "egg_energy_user_egg_score"
  7. const EggEnergyUserEggScoreEsMapping = `
  8. {
  9. "settings" : {
  10. "number_of_shards" : 2,
  11. "number_of_replicas" : 1
  12. },
  13. "aliases": {
  14. "egg_energy_user_egg_score": {}
  15. },
  16. "mappings":{
  17. "properties":{
  18. "uid":{
  19. "type": "integer"
  20. },
  21. "score_value":{
  22. "type": "float"
  23. },
  24. "score_value_kind":{
  25. "type": "short"
  26. },
  27. "ecpm":{
  28. "type": "double"
  29. },
  30. "ecpm_avg":{
  31. "type": "double"
  32. },
  33. "ecpm_nums":{
  34. "type": "integer"
  35. },
  36. "invite_user_nums":{
  37. "type": "integer"
  38. },
  39. "team_activity_nums":{
  40. "type": "integer"
  41. },
  42. "sign_in_nums":{
  43. "type": "short"
  44. },
  45. "im_activity_nums":{
  46. "type": "short"
  47. },
  48. "send_red_package_nums":{
  49. "type": "short"
  50. },
  51. "egg_energy_exchange_account_balance":{
  52. "type": "double"
  53. },
  54. "account_balance_exchange_egg_energy_nums":{
  55. "type": "double"
  56. },
  57. "send_circle_of_friend_nums":{
  58. "type": "short"
  59. },
  60. "forum_comments_nums":{
  61. "type": "integer"
  62. },
  63. "college_learning_nums":{
  64. "type": "short"
  65. },
  66. "violate_nums":{
  67. "type": "short"
  68. },
  69. "browse_interface_nums":{
  70. "type": "integer"
  71. },
  72. "person_add_activity_value":{
  73. "type": "double"
  74. },
  75. "created_at":{
  76. "type": "date",
  77. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  78. },
  79. "updated_at":{
  80. "type": "date",
  81. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  82. }
  83. }
  84. }
  85. }`
  86. type EggEnergyUserEggScoreEs struct {
  87. Uid int64 `json:"uid" label:"uid"`
  88. ScoreValue float64 `json:"score_value" label:"蛋蛋分值"`
  89. ScoreValueKind int32 `json:"score_value_kind" label:"评分类型(0:未知 1:人工 2:系统)"`
  90. Ecpm float64 `json:"ecpm" label:"ecpm"`
  91. EcpmAvg float64 `json:"ecpm_avg" label:"ecpm平均值"`
  92. EcpmNums int `json:"ecpm_nums" label:"ecpm次数"`
  93. InviteUserNums int `json:"invite_user_nums" label:"拉新人数"`
  94. TeamActivityNums int `json:"team_activity_nums" label:"团队活跃次数"`
  95. SignInNums int `json:"sign_in_nums" label:"签到次数"`
  96. ImActivityNums int `json:"im_activity_nums" label:"im活跃次数"`
  97. SendRedPackageNums int `json:"send_red_package_nums" label:"发红包次数"`
  98. EggEnergyExchangeAccountBalance float64 `json:"egg_energy_exchange_account_balance" label:"蛋蛋能量兑换余额数量"`
  99. AccountBalanceExchangeEggEnergyNums float64 `json:"account_balance_exchange_egg_energy_nums" label:"余额兑换蛋蛋能量数量"`
  100. SendCircleOfFriendNums int `json:"send_circle_of_friend_nums" label:"发朋友圈次数"`
  101. ForumCommentsNums int `json:"forum_comments_nums" label:"论坛评论次数"`
  102. CollegeLearningNums int `json:"college_learning_nums" label:"学院学习次数"`
  103. ViolateNums int `json:"violate_nums" label:"违规次数"`
  104. BrowseInterfaceNums int `json:"browse_interface_nums" label:"浏览界面次数"`
  105. PersonAddActivityValue float64 `json:"person_add_activity_value" label:"个人活跃积分"`
  106. CreatedAt string `json:"created_at"`
  107. UpdatedAt string `json:"updated_at"`
  108. }
  109. const EggFriendCircleEsAlias = "egg_friend_circle"
  110. const EggFriendCircleEsIndex = "egg_friend_circle_1"
  111. const EggFriendCircleEsMapping = `
  112. {
  113. "settings" : {
  114. "number_of_shards" : 2,
  115. "number_of_replicas" : 1
  116. },
  117. "aliases": {
  118. "egg_friend_circle": {}
  119. },
  120. "mappings":{
  121. "properties":{
  122. "uid":{
  123. "type": "integer"
  124. },
  125. "im_uid":{
  126. "type": "integer"
  127. },
  128. "kind":{
  129. "type": "short"
  130. },
  131. "content":{
  132. "type": "text",
  133. "analyzer": "ik_smart"
  134. },
  135. "image":{
  136. "type": "keyword"
  137. },
  138. "video":{
  139. "type": "keyword"
  140. },
  141. "likes_nums":{
  142. "type": "integer"
  143. },
  144. "comment_nums":{
  145. "type": "integer"
  146. },
  147. "share_nums":{
  148. "type": "integer"
  149. },
  150. "state":{
  151. "type": "short"
  152. },
  153. "is_praise":{
  154. "type": "short"
  155. },
  156. "is_top_up":{
  157. "type": "short"
  158. },
  159. "created_at":{
  160. "type": "date",
  161. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  162. },
  163. "updated_at":{
  164. "type": "date",
  165. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  166. }
  167. }
  168. }
  169. }`
  170. type EggFriendCircleEs struct {
  171. Uid int64 `json:"uid" label:"uid"`
  172. ImUid int64 `json:"im_uid" label:"im_uid"`
  173. Kind int32 `json:"kind" label:"类型(1:普通 2:官方)"`
  174. Content string `json:"content" label:"文本内容"`
  175. Image string `json:"image" label:"图片"`
  176. Video string `json:"video" label:"视频"`
  177. LikesNums int `json:"likes_nums" label:"点赞数"`
  178. ShareNums int `json:"share_nums" label:"分享数"`
  179. CommentNums int `json:"comment_nums" label:"评论数"`
  180. State int32 `json:"state" label:"状态(1:正常 2:隐藏)"`
  181. IsTopUp int32 `json:"is_top_up" label:"是否置顶(1:是 2:否)"`
  182. IsPraise int32 `json:"is_praise" label:"是否被表扬(1:是 2:否)"`
  183. CreatedAt string `json:"created_at"`
  184. UpdatedAt string `json:"updated_at"`
  185. }
  186. const EggFriendCircleCommentEsAlias = "egg_friend_circle_comment"
  187. const EggFriendCircleCommentEsIndex = "egg_friend_circle_comment_"
  188. const EggFriendCircleCommentEsMapping = `
  189. {
  190. "settings" : {
  191. "number_of_shards" : 2,
  192. "number_of_replicas" : 1
  193. },
  194. "aliases": {
  195. "egg_friend_circle_comment": {}
  196. },
  197. "mappings":{
  198. "properties":{
  199. "uid":{
  200. "type": "integer"
  201. },
  202. "im_uid":{
  203. "type": "integer"
  204. },
  205. "circle_id":{
  206. "type": "keyword"
  207. },
  208. "comment_id":{
  209. "type": "keyword"
  210. },
  211. "reply_comment_id":{
  212. "type": "keyword"
  213. },
  214. "content":{
  215. "type": "keyword"
  216. },
  217. "kind":{
  218. "type": "short"
  219. },
  220. "is_praise":{
  221. "type": "short"
  222. },
  223. "likes_nums":{
  224. "type": "integer"
  225. },
  226. "comment_nums":{
  227. "type": "integer"
  228. },
  229. "state":{
  230. "type": "short"
  231. },
  232. "created_at":{
  233. "type": "date",
  234. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  235. },
  236. "updated_at":{
  237. "type": "date",
  238. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  239. }
  240. }
  241. }
  242. }`
  243. type EggFriendCircleCommentEs struct {
  244. Uid int64 `json:"uid" label:"uid"`
  245. ImUid int64 `json:"im_uid" label:"im_uid"`
  246. Kind int32 `json:"kind" label:"类型(1:普通 2:官方)"`
  247. CircleId string `json:"circle_id" label:"朋友圈id"`
  248. CommentId string `json:"comment_id" label:"评论id"`
  249. CommentImUid int64 `json:"comment_im_uid" label:"回复评论用户id"`
  250. ReplyCommentId string `json:"reply_comment_id" label:"回复评论id"`
  251. ReplyCommentImUid int64 `json:"reply_comment_im_uid" label:"回复评论用户id"`
  252. Content string `json:"content" label:"文本内容"`
  253. LikesNums int `json:"likes_nums" label:"点赞数"`
  254. CommentNums int `json:"comment_nums" label:"评论数"`
  255. State int32 `json:"state" label:"状态(1:正常 2:隐藏)"`
  256. IsPraise int32 `json:"is_praise" label:"是否被表扬(1:是 2:否)"`
  257. CreatedAt string `json:"created_at"`
  258. UpdatedAt string `json:"updated_at"`
  259. }
  260. //const EggFriendCircleCommentLikeEsAlias = "egg_friend_circle_comment_like"
  261. //const EggFriendCircleCommentLikeEsIndex = "egg_friend_circle_comment_like_"
  262. //const EggFriendCircleCommentLikeEsMapping = `
  263. //{
  264. // "settings" : {
  265. // "number_of_shards" : 2,
  266. // "number_of_replicas" : 1
  267. // },
  268. // "aliases": {
  269. // "egg_friend_circle_comment": {}
  270. // },
  271. // "mappings":{
  272. // "properties":{
  273. // "uid":{
  274. // "type": "integer"
  275. // },
  276. // "im_uid":{
  277. // "type": "integer"
  278. // },
  279. // "comment_id":{
  280. // "type": "integer"
  281. // },
  282. // "created_at":{
  283. // "type": "date",
  284. // "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  285. // },
  286. // "updated_at":{
  287. // "type": "date",
  288. // "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  289. // }
  290. // }
  291. // }
  292. //}`
  293. //
  294. //type EggFriendCircleCommentLikeEs struct {
  295. // Uid int64 `json:"uid" label:"uid"`
  296. // ImUid int64 `json:"im_uid" label:"im_uid"`
  297. // CommentId string `json:"comment_id" label:"评论id"`
  298. // CreatedAt string `json:"created_at"`
  299. // UpdatedAt string `json:"updated_at"`
  300. //}
  301. const EggFriendCircleLikeEsAlias = "egg_friend_circle_like"
  302. const EggFriendCircleLikeEsIndex = "egg_friend_circle_like_"
  303. const EggFriendCircleLikeEsMapping = `
  304. {
  305. "settings" : {
  306. "number_of_shards" : 2,
  307. "number_of_replicas" : 1
  308. },
  309. "aliases": {
  310. "egg_friend_circle_like": {}
  311. },
  312. "mappings":{
  313. "properties":{
  314. "uid":{
  315. "type": "integer"
  316. },
  317. "circle_id":{
  318. "type": "keyword"
  319. },
  320. "created_at":{
  321. "type": "date",
  322. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  323. },
  324. "updated_at":{
  325. "type": "date",
  326. "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
  327. }
  328. }
  329. }
  330. }`
  331. type EggFriendCircleLikeEs struct {
  332. Uid int64 `json:"uid" label:"uid"`
  333. ImUid int64 `json:"im_uid" label:"im_uid"`
  334. CircleId string `json:"circle_id" label:"朋友圈id"`
  335. CreatedAt string `json:"created_at"`
  336. UpdatedAt string `json:"updated_at"`
  337. }