report.go 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. package response
  2. import (
  3. "time"
  4. )
  5. type ReportDetail struct {
  6. ReportInfo *ReportItem `json:"report_info"`
  7. ReportChapterList []*ReportChapterListItem `json:"report_chapter_list"`
  8. PermissionCheck *PermissionCheckInfo `json:"permission_check"`
  9. AuthOk bool `json:"auth_ok"`
  10. }
  11. type ReportChapterListItem struct {
  12. ReportChapterId int `json:"report_chapter_id"`
  13. ReportId int `json:"report_id"`
  14. Title string `json:"title"`
  15. TypeId int `json:"type_id"`
  16. TypeName string `json:"type_name"`
  17. Trend string `json:"trend"`
  18. ReportChapterTypeKey string `json:"report_chapter_type_key"`
  19. ReportChapterTypeThumb string `json:"report_chapter_type_thumb"`
  20. ReportChapterTypeName string `json:"report_chapter_type_name"`
  21. Sort int `json:"sort"`
  22. PublishTime time.Time `json:"publish_time"`
  23. }
  24. type ReportItem struct {
  25. ReportId int `json:"report_id"`
  26. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  27. ClassifyNameSecond string `description:"二级分类名称" json:"classify_name_second"`
  28. Title string `description:"标题" json:"title"`
  29. Abstract string `description:"摘要" json:"abstract"`
  30. Author string `description:"作者" json:"author"`
  31. Frequency string `description:"频度" json:"frequency"`
  32. PublishTime time.Time `description:"发布时间" json:"publish_time"`
  33. Stage int `description:"期数" json:"stage"`
  34. Content string `description:"内容" json:"content"`
  35. VideoUrl string `description:"音频文件URL" json:"video_url"`
  36. VideoName string `description:"音频文件名称" json:"video_name"`
  37. VideoPlaySeconds string `description:"音频播放时长" json:"video_play_seconds"`
  38. ContentSub string `description:"内容前两个章节" json:"content_sub"`
  39. BannerUrl string `description:"详情页banner" json:"banner_url"`
  40. }
  41. type ReportChapterItem struct {
  42. ReportChapterId int `json:"report_chapter_id"`
  43. ReportId int `json:"report_id"`
  44. Title string `json:"title"`
  45. TypeId int `json:"type_id"`
  46. TypeName string `json:"type_name"`
  47. Trend string `json:"trend"`
  48. ReportChapterTypeName string `json:"report_chapter_type_name"`
  49. PublishTime time.Time `json:"publish_time"`
  50. Content string `description:"内容" json:"content"`
  51. ContentSub string `description:"内容前两个章节" json:"content_sub"`
  52. VideoUrl string `json:"video_url"` //音频文件URL
  53. VideoName string `json:"video_name"` //音频文件名称
  54. VideoPlaySeconds string `json:"video_play_seconds"` //音频播放时长
  55. VideoSize string `json:"video_size"`
  56. Author string `description:"作者" json:"author"`
  57. Stage int `description:"期数" json:"stage"`
  58. ClassifyIdFirst int `description:"一级分类id" json:"classify_id_first"`
  59. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  60. }
  61. type ReportChapterDetail struct {
  62. ReportChapterItem * ReportChapterItem `json:"report_chapter_item"`
  63. PermissionCheck *PermissionCheckInfo `json:"permission_check"`
  64. ReportChapterMenuList []*ReportChapterMenu `json:"report_chapter_menu_list""`
  65. AuthOk bool `json:"auth_ok"`
  66. }
  67. type ReportChapterMenu struct {
  68. ReportChapterId int `json:"report_chapter_id"`
  69. ReportId int `json:"report_id"`
  70. ReportChapterTypeName string `json:"report_chapter_type_name"`
  71. ReportChapterTypeThumb string `json:"report_chapter_type_thumb"`
  72. }
  73. type ReportListItem struct {
  74. ReportId int `description:"报告Id" json:"report_id"`
  75. ClassifyIdFirst int `description:"一级分类id" json:"classify_id_first"`
  76. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  77. ClassifyIdSecond int `description:"二级分类id" json:"classify_id_second"`
  78. ClassifyNameSecond string `description:"二级分类名称" json:"classify_name_second"`
  79. Title string `description:"标题" json:"title"`
  80. Abstract string `description:"摘要" json:"abstract"`
  81. Author string `description:"作者" json:"author"`
  82. ReportImgUrl string `description:"作者头像" json:"report_img_url"`
  83. PublishTime time.Time `description:"发布时间" json:"publish_time"`
  84. Stage int `description:"期数" json:"stage"`
  85. VideoUrl string `description:"音频文件URL" json:"video_url"`
  86. AuthOk bool `json:"auth_ok"`
  87. }
  88. type ReportList struct {
  89. Paging *PagingItem `json:"paging"`
  90. List []*ReportListItem `json:"list"`
  91. }
  92. type ReportCollectListItem struct {
  93. ReportId int `description:"报告Id" json:"report_id"`
  94. ReportChapterId int `json:"report_chapter_id"`
  95. ClassifyIdFirst int `description:"一级分类id" json:"classify_id_first"`
  96. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  97. ClassifyIdSecond int `description:"二级分类id" json:"classify_id_second"`
  98. ClassifyNameSecond string `description:"二级分类名称" json:"classify_name_second"`
  99. ReportChapterTypeId int `json:"report_chapter_type_id"`
  100. PublishTime time.Time `description:"发布时间" json:"publish_time"`
  101. Title string `description:"标题" json:"title"`
  102. ContentSub string `description:"内容前两个章节" json:"content_sub"`
  103. }
  104. type ReportCollectList struct {
  105. Date string `json:"date"`
  106. SubList []*ReportCollectListItem `json:"sub_list"`
  107. }
  108. type ReportCollectResp struct {
  109. Paging *PagingItem `json:"paging"`
  110. List []*ReportCollectList `json:"list"`
  111. }
  112. type ReportSearchResp struct {
  113. Paging *PagingItem `json:"paging"`
  114. List []*ReportCollectListItem `json:"list"`
  115. }
  116. type EsReportItem struct {
  117. Author string `description:"作者"`
  118. BodyContent string `description:"内容"`
  119. Categories string `description:"品种名称"`
  120. ClassifyIdFirst int `description:"一级分类id"`
  121. ClassifyNameFirst string `description:"一级分类名称"`
  122. ClassifyIdSecond int `description:"二级分类id"`
  123. ClassifyNameSecond string `description:"二级分类名称"`
  124. PublishState int `description:"1:未发布,2:已发布"`
  125. PublishTime string `description:"发布时间"`
  126. ReportChapterId int `description:"报告章节Id"`
  127. ReportId int `description:"报告Id"`
  128. Title string `description:"标题"`
  129. }
  130. type TickerDataItem struct {
  131. Date string `json:"date"`
  132. Ticker string `json:"ticker"`
  133. BaseColumnName string `json:"base_column_name"`
  134. TickerValue float64 `json:"ticker_value"`
  135. LastValue float64 `json:"last_value"`
  136. DdValue float64 `json:"dd_value"`
  137. WwValue float64 `json:"ww_value"`
  138. MmValue float64 `json:"mm_value"`
  139. }
  140. type ReportCollectListResp []*ReportCollectList
  141. func (p ReportCollectListResp) Len() int {
  142. return len(p)
  143. }
  144. func (p ReportCollectListResp) Less(i, j int) bool {
  145. return p[i].Date > p[j].Date
  146. }
  147. func (p ReportCollectListResp) Swap(i, j int) {
  148. p[i], p[j] = p[j], p[i]
  149. }