entity.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. package marketanalysis
  2. type BWBuckets struct {
  3. Buyerterms struct {
  4. Buckets []struct {
  5. Key string `json:"key"`
  6. DocCount int `json:"doc_count"`
  7. } `json:"buckets"`
  8. } `json:"buyerterms"`
  9. Winnerterms struct {
  10. Buckets []struct {
  11. Key string `json:"key"`
  12. DocCount int `json:"doc_count"`
  13. } `json:"buckets"`
  14. } `json:"winnerterms"`
  15. }
  16. type marketTime struct {
  17. Thismarket struct {
  18. Buckets []marketBuckets `json:"buckets"`
  19. } `json:"thismarket"`
  20. Oldmarket struct {
  21. Buckets []marketBuckets `json:"buckets"`
  22. } `json:"oldmarket"`
  23. Monthtime struct {
  24. Buckets []Buckets `json:"buckets"`
  25. } `json:"monthtime"`
  26. Yeartime struct {
  27. Buckets []Buckets `json:"buckets"`
  28. } `json:"yeartime"`
  29. }
  30. type marketBuckets struct {
  31. ProjectCount struct {
  32. DocCount int `json:"doc_count"`
  33. } `json:"project_count"`
  34. ProjectAmount struct {
  35. Value float64 `json:"value"`
  36. } `json:"project_amount"`
  37. BuyerCount struct {
  38. Value int `json:"value"`
  39. } `json:"buyer_count"`
  40. WinnerCount struct {
  41. Value int `json:"value"`
  42. } `json:"winner_count"`
  43. ProjectAvgMoney struct {
  44. //DocCount int `json:"doc_count"`
  45. //AvgAmount struct {
  46. // Value float64 `json:"value"`
  47. //} `json:"avg_amount"`
  48. Value float64 `json:"value"`
  49. } `json:"project_avgMoney"`
  50. }
  51. type Buckets struct {
  52. Key string `json:"key"`
  53. From int `json:"from"`
  54. FromAsString string `json:"from_as_string"`
  55. To int `json:"to"`
  56. ToAsString string `json:"to_as_string"`
  57. DocCount int `json:"doc_count"`
  58. ScaleTotal struct {
  59. DocCount int `json:"doc_count"`
  60. } `json:"scale_total"`
  61. ScaleAmount struct {
  62. Value float64 `json:"value"`
  63. } `json:"scale_amount"`
  64. }
  65. type AreaCTop struct {
  66. ProjectCount struct {
  67. DocCount int `json:"doc_count"`
  68. } `json:"project_count"`
  69. Total int64 `json:"doc_count"`
  70. CountNot0 struct {
  71. Count int64 `json:"doc_count"`
  72. } `json:"project_count_not0"`
  73. Amount struct {
  74. Value float64 `json:"value"`
  75. } `json:"project_amount"`
  76. SortpriceRanges struct {
  77. Buckets []struct {
  78. Name string `json:"key"`
  79. Total int64 `json:"doc_count"`
  80. SumSortprice struct {
  81. Value float64 `json:"value"`
  82. } `json:"sum_sortprice"`
  83. }
  84. } `json:"sortprice_ranges"`
  85. AreaDistribution struct {
  86. Buckets []struct {
  87. Area string `json:"key"`
  88. AreaTotal int64 `json:"doc_count"`
  89. AreaAmount struct {
  90. Value float64 `json:"value"`
  91. } `json:"area_amount"`
  92. BuyclassAmount struct {
  93. Value float64 `json:"value"`
  94. } `json:"buyerclass_amount"`
  95. CityGroup struct {
  96. Buckets []struct {
  97. City string `json:"key"`
  98. CityTotal int64 `json:"doc_count"`
  99. CityAmount struct {
  100. Value float64 `json:"value"`
  101. } `json:"city_amount"`
  102. }
  103. } `json:"city_group"`
  104. }
  105. } `json:"area_distribution"`
  106. BuyerclassScale struct {
  107. Buckets []struct {
  108. Area string `json:"key"`
  109. AreaTotal int64 `json:"doc_count"`
  110. AreaAmount struct {
  111. Value float64 `json:"value"`
  112. } `json:"area_amount"`
  113. BuyclassAmount struct {
  114. Value float64 `json:"value"`
  115. } `json:"buyerclass_amount"`
  116. }
  117. } `json:"buyerclass_scale"`
  118. BuyerclassScaleOther struct {
  119. Buckets []struct {
  120. Area string `json:"key"`
  121. AreaTotal int64 `json:"doc_count"`
  122. AreaAmount struct {
  123. Value float64 `json:"value"`
  124. } `json:"area_amount"`
  125. BuyclassAmount struct {
  126. Value float64 `json:"value"`
  127. } `json:"buyerclass_amount"`
  128. }
  129. } `json:"buyerclass_scale_other"`
  130. AreaAmountTop3 struct {
  131. Buckets []struct {
  132. Key string `json:"key"`
  133. Total int64 `json:"doc_count"`
  134. AreaAmount struct {
  135. Amount float64 `json:"value"`
  136. } `json:"area_amount"`
  137. WinnerTop struct {
  138. Buckets []struct {
  139. Winner string `json:"key"`
  140. WinnerTotal int64 `json:"doc_count"`
  141. WinnerAmount struct {
  142. Amount float64 `json:"value"`
  143. } `json:"area_winner_amount"`
  144. ProjectDetail struct {
  145. Hits struct {
  146. Hits []struct {
  147. Source struct {
  148. Entidlist []string `json:"entidlist"`
  149. SWinner string `json:"s_winner"`
  150. } `json:"_source"`
  151. }
  152. }
  153. } `json:"project_detail"`
  154. }
  155. } `json:"winner_top"`
  156. }
  157. } `json:"area_amount_top3"`
  158. AreaCountTop3 struct {
  159. Buckets []struct {
  160. Area string `json:"key"`
  161. Total int64 `json:"doc_count"`
  162. WinnerTop struct {
  163. Buckets []struct {
  164. Winner string `json:"key"`
  165. WinnerTotal int64 `json:"doc_count"`
  166. ProjectDetail struct {
  167. Hits struct {
  168. Hits []struct {
  169. Source struct {
  170. Entidlist []string `json:"entidlist"`
  171. SWinner string `json:"s_winner"`
  172. } `json:"_source"`
  173. }
  174. }
  175. } `json:"project_detail"`
  176. }
  177. } `json:"winner_top"`
  178. }
  179. } `json:"area_count_top3"`
  180. BuyclassAmountTop3 struct {
  181. Buckets []struct {
  182. Key string `json:"key"`
  183. Total int64 `json:"doc_count"`
  184. AreaAmount struct {
  185. Amount float64 `json:"value"`
  186. } `json:"buyerclass_amount"`
  187. WinnerTop struct {
  188. Buckets []struct {
  189. Winner string `json:"key"`
  190. WinnerTotal int64 `json:"doc_count"`
  191. WinnerAmount struct {
  192. Amount float64 `json:"value"`
  193. } `json:"buyer_winner_amount"`
  194. ProjectDetail struct {
  195. Hits struct {
  196. Hits []struct {
  197. Source struct {
  198. Entidlist []string `json:"entidlist"`
  199. SWinner string `json:"s_winner"`
  200. } `json:"_source"`
  201. }
  202. }
  203. } `json:"project_detail"`
  204. }
  205. } `json:"winner_top"`
  206. }
  207. } `json:"buyerclass_amount_top3"`
  208. BuyclassCountTop3 struct {
  209. Buckets []struct {
  210. Buyclass string `json:"key"`
  211. Total int64 `json:"doc_count"`
  212. BidcountTop struct {
  213. Buckets []struct {
  214. Winner string `json:"key"`
  215. WinnerTotal int64 `json:"doc_count"`
  216. ProjectDetail struct {
  217. Hits struct {
  218. Hits []struct {
  219. Source struct {
  220. Entidlist []string `json:"entidlist"`
  221. SWinner string `json:"s_winner"`
  222. } `json:"_source"`
  223. }
  224. }
  225. } `json:"project_detail"`
  226. }
  227. } `json:"bidcount_top"`
  228. }
  229. } `json:"buyerclass_count_top3"`
  230. }
  231. type BuyerWinnerRow struct {
  232. BuyerAmountDistribution struct {
  233. Buckets []struct {
  234. Key string `json:"key"`
  235. DocCount int `json:"doc_count"`
  236. Amount struct {
  237. Value float64 `json:"value"`
  238. } `json:"amount"`
  239. } `json:"buckets"`
  240. } `json:"buyer_amount_distribution"`
  241. ProjectAmount struct {
  242. Value float64 `json:"value"`
  243. } `json:"project_amount"`
  244. BuyerCountTop3 struct {
  245. Buckets []struct {
  246. Key string `json:"key"`
  247. BuyerCount struct {
  248. //Value int64 `json:"value"`
  249. Value int64 `json:"doc_count"`
  250. } `json:"buyer_count"`
  251. SWinnerTop struct {
  252. Buckets []struct {
  253. Key string `json:"key"`
  254. DocCount int64 `json:"doc_count"`
  255. ProjectDetail struct {
  256. Hits struct {
  257. Total int `json:"total"`
  258. MaxScore int `json:"max_score"`
  259. Hits []struct {
  260. Source struct {
  261. Entidlist []string `json:"entidlist"`
  262. SWinner string `json:"s_winner"`
  263. } `json:"_source"`
  264. } `json:"hits"`
  265. } `json:"hits"`
  266. } `json:"project_detail"`
  267. BuyerWinnerAmount struct {
  268. //Value int64 `json:"value"`
  269. Value int64 `json:"doc_count"`
  270. } `json:"buyer_winner_count"`
  271. } `json:"buckets"`
  272. Value float64 `json:"value"`
  273. } `json:"s_winner_top"`
  274. } `json:"buckets"`
  275. } `json:"buyer_count_top3"`
  276. BuyerAmountTop3 struct {
  277. Buckets []struct {
  278. Key string `json:"key"`
  279. BuyerAmount struct {
  280. Value float64 `json:"value"`
  281. } `json:"buyer_amount"`
  282. SWinnerTop struct {
  283. Buckets []struct {
  284. Key string `json:"key"`
  285. DocCount int64 `json:"doc_count"`
  286. ProjectDetail struct {
  287. Hits struct {
  288. Total int `json:"total"`
  289. MaxScore int `json:"max_score"`
  290. Hits []struct {
  291. Source struct {
  292. Entidlist []string `json:"entidlist"`
  293. SWinner string `json:"s_winner"`
  294. } `json:"_source"`
  295. } `json:"hits"`
  296. } `json:"hits"`
  297. } `json:"project_detail"`
  298. BuyerWinnerAmount struct {
  299. Value float64 `json:"value"`
  300. } `json:"buyer_winner_amount"`
  301. } `json:"buckets"`
  302. Value float64 `json:"value"`
  303. } `json:"s_winner_top"`
  304. } `json:"buckets"`
  305. } `json:"buyer_amount_top3"`
  306. WinnerAmountDistribution struct {
  307. EntidlistTerms struct {
  308. Buckets []struct {
  309. Key string `json:"key"`
  310. Amount struct {
  311. Value float64 `json:"value"`
  312. } `json:"amount"`
  313. } `json:"buckets"`
  314. } `json:"entidlist_terms"`
  315. } `json:"winner_amount_distribution"`
  316. WinnerCountTop3 struct {
  317. SWinnerCount []struct {
  318. Key string `json:"key"`
  319. ProjectDetail struct {
  320. Hits struct {
  321. Total int `json:"total"`
  322. MaxScore int `json:"max_score"`
  323. Hits []struct {
  324. Id string `json:"_id"`
  325. Source struct {
  326. Entidlist []string `json:"entidlist"`
  327. SWinner string `json:"s_winner"`
  328. } `json:"_source"`
  329. } `json:"hits"`
  330. } `json:"hits"`
  331. } `json:"project_detail"`
  332. BuyerCount struct {
  333. //Value int64 `json:"value"`
  334. Value int64 `json:"doc_count"`
  335. } `json:"s_winner_count"`
  336. BuyerTop struct {
  337. Buckets []struct {
  338. Key string `json:"key"`
  339. DocCount int64 `json:"doc_count"`
  340. BuyerWinnerAmount struct {
  341. //Value int64 `json:"value"`
  342. Value int64 `json:"doc_count"`
  343. } `json:"buyer_winner_count"`
  344. } `json:"buckets"`
  345. Value float64 `json:"value"`
  346. } `json:"buyer_top"`
  347. } `json:"buckets"`
  348. } `json:"winner_count_top3"`
  349. WinnerAmountTop3 struct {
  350. SWinnerAmount []struct {
  351. Key string `json:"key"`
  352. ProjectDetail struct {
  353. Hits struct {
  354. Total int `json:"total"`
  355. MaxScore int `json:"max_score"`
  356. Hits []struct {
  357. Source struct {
  358. Entidlist []string `json:"entidlist"`
  359. SWinner string `json:"s_winner"`
  360. } `json:"_source"`
  361. } `json:"hits"`
  362. } `json:"hits"`
  363. } `json:"project_detail"`
  364. SWinnerAmount struct {
  365. Value float64 `json:"value"`
  366. } `json:"s_winner_amount"`
  367. BuyerTop struct {
  368. Buckets []struct {
  369. Key string `json:"key"`
  370. DocCount int64 `json:"doc_count"`
  371. BuyerWinnerAmount struct {
  372. Value float64 `json:"value"`
  373. } `json:"buyer_winner_amount"`
  374. } `json:"buckets"`
  375. Value float64 `json:"value"`
  376. } `json:"buyer_top"`
  377. } `json:"buckets"`
  378. } `json:"winner_amount_top3"`
  379. }
  380. type distributionTrend struct {
  381. Key string
  382. Count int
  383. Amount float64
  384. }