report.go 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. Sort int `json:"sort"`
  73. }
  74. type ReportListItem struct {
  75. ReportId int `description:"报告Id" json:"report_id"`
  76. ClassifyIdFirst int `description:"一级分类id" json:"classify_id_first"`
  77. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  78. ClassifyIdSecond int `description:"二级分类id" json:"classify_id_second"`
  79. ClassifyNameSecond string `description:"二级分类名称" json:"classify_name_second"`
  80. Title string `description:"标题" json:"title"`
  81. Abstract string `description:"摘要" json:"abstract"`
  82. Author string `description:"作者" json:"author"`
  83. ReportImgUrl string `description:"作者头像" json:"report_img_url"`
  84. PublishTime time.Time `description:"发布时间" json:"publish_time"`
  85. Stage int `description:"期数" json:"stage"`
  86. VideoUrl string `description:"音频文件URL" json:"video_url"`
  87. AuthOk bool `json:"auth_ok"`
  88. TitleInfo string `json:"title_info"`
  89. }
  90. type ReportList struct {
  91. Paging *PagingItem `json:"paging"`
  92. List []*ReportListItem `json:"list"`
  93. }
  94. type ReportCollectListItem struct {
  95. ReportId int `description:"报告Id" json:"report_id"`
  96. ReportChapterId int `json:"report_chapter_id"`
  97. ClassifyIdFirst int `description:"一级分类id" json:"classify_id_first"`
  98. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  99. ClassifyIdSecond int `description:"二级分类id" json:"classify_id_second"`
  100. ClassifyNameSecond string `description:"二级分类名称" json:"classify_name_second"`
  101. ReportChapterTypeId int `json:"report_chapter_type_id"`
  102. PublishTime time.Time `description:"发布时间" json:"publish_time"`
  103. Title string `description:"标题" json:"title"`
  104. ContentSub string `description:"内容前两个章节" json:"content_sub"`
  105. }
  106. type ReportCollectList struct {
  107. Date string `json:"date"`
  108. SubList []*ReportCollectListItem `json:"sub_list"`
  109. }
  110. type ReportCollectResp struct {
  111. Paging *PagingItem `json:"paging"`
  112. List []*ReportCollectList `json:"list"`
  113. }
  114. type ReportSearchResp struct {
  115. Paging *PagingItem `json:"paging"`
  116. List []*ReportCollectListItem `json:"list"`
  117. }
  118. type EsReportItem struct {
  119. Author string `description:"作者"`
  120. BodyContent string `description:"内容"`
  121. Categories string `description:"品种名称"`
  122. ClassifyIdFirst int `description:"一级分类id"`
  123. ClassifyNameFirst string `description:"一级分类名称"`
  124. ClassifyIdSecond int `description:"二级分类id"`
  125. ClassifyNameSecond string `description:"二级分类名称"`
  126. PublishState int `description:"1:未发布,2:已发布"`
  127. PublishTime string `description:"发布时间"`
  128. ReportChapterId int `description:"报告章节Id"`
  129. ReportId int `description:"报告Id"`
  130. Title string `description:"标题"`
  131. Abstract string `description:"摘要"`
  132. StageStr string `description:"期数"`
  133. }
  134. type TickerDataItem struct {
  135. Date string `json:"date"`
  136. Ticker string `json:"ticker"`
  137. BaseColumnName string `json:"base_column_name"`
  138. TickerValue float64 `json:"ticker_value"`
  139. LastValue float64 `json:"last_value"`
  140. DdValue float64 `json:"dd_value"`
  141. WwValue float64 `json:"ww_value"`
  142. MmValue float64 `json:"mm_value"`
  143. }
  144. type TickerTitleData struct {
  145. TickerTitle string `json:"ticker_title"`
  146. ReportChapterTypeId int `json:"report_chapter_type_id"`
  147. ReportChapterTypeName string `json:"report_chapter_type_name"`
  148. DataTableImage string `json:"data_table_image"`
  149. }
  150. type TickerData struct {
  151. List []*TickerDataItem `json:"list"`
  152. TickerTitle *TickerTitleData `json:"ticker_title"`
  153. }
  154. type ReportCollectListResp []*ReportCollectList
  155. func (p ReportCollectListResp) Len() int {
  156. return len(p)
  157. }
  158. func (p ReportCollectListResp) Less(i, j int) bool {
  159. return p[i].Date > p[j].Date
  160. }
  161. func (p ReportCollectListResp) Swap(i, j int) {
  162. p[i], p[j] = p[j], p[i]
  163. }
  164. type ReportChapterList []*ReportChapterListItem
  165. func (r ReportChapterList) Len() int {
  166. return len(r)
  167. }
  168. func (r ReportChapterList) Less(i, j int) bool {
  169. return r[i].Sort < r[j].Sort
  170. }
  171. func (r ReportChapterList) Swap(i, j int) {
  172. r[i], r[j] = r[j], r[i]
  173. }
  174. type ReportChapterMenuList []*ReportChapterMenu
  175. func (rc ReportChapterMenuList) Len() int {
  176. return len(rc)
  177. }
  178. func (rc ReportChapterMenuList) Less(i, j int) bool {
  179. return rc[i].Sort < rc[j].Sort
  180. }
  181. func (rc ReportChapterMenuList) Swap(i, j int) {
  182. rc[i], rc[j] = rc[j], rc[i]
  183. }