report.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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. LikeNum int64 `description:"点赞总数" json:"like_num"`
  11. LikeEnabled int8 `description:"是否已点赞: 0-未点赞 1-已点赞" json:"like_enabled"`
  12. ReportShowType int `descritpion:"展示形式:1-列表 2-专栏" json:"report_show_type"`
  13. CollectionId int `description:"收藏ID: 大于0则表示已收藏" json:"collection_id"`
  14. RoadVideoId int `json:"road_video_id" description:"绑定的路演视频ID"`
  15. }
  16. type ReportChapterListItem struct {
  17. ReportChapterId int `json:"report_chapter_id"`
  18. ReportId int `json:"report_id"`
  19. Title string `json:"title"`
  20. TypeId int `json:"type_id"`
  21. TypeName string `json:"type_name"`
  22. Trend string `json:"trend"`
  23. ReportChapterTypeKey string `json:"report_chapter_type_key"`
  24. ReportChapterTypeThumb string `json:"report_chapter_type_thumb"`
  25. ReportChapterTypeName string `json:"report_chapter_type_name"`
  26. Sort int `json:"sort"`
  27. PublishTime time.Time `json:"publish_time"`
  28. }
  29. type ReportItem struct {
  30. ReportId int `json:"report_id"`
  31. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  32. ClassifyNameSecond string `description:"二级分类名称" json:"classify_name_second"`
  33. Title string `description:"标题" json:"title"`
  34. Abstract string `description:"摘要" json:"abstract"`
  35. Author string `description:"作者" json:"author"`
  36. Frequency string `description:"频度" json:"frequency"`
  37. PublishTime time.Time `description:"发布时间" json:"publish_time"`
  38. Stage int `description:"期数" json:"stage"`
  39. Content string `description:"内容" json:"content"`
  40. VideoUrl string `description:"音频文件URL" json:"video_url"`
  41. VideoName string `description:"音频文件名称" json:"video_name"`
  42. VideoSize string `description:"音频文件大小,单位M" json:"video_size"`
  43. VideoPlaySeconds string `description:"音频播放时长" json:"video_play_seconds"`
  44. VideoImg string `description:"音频播放条的图片" json:"video_img"`
  45. ContentSub string `description:"内容前两个章节" json:"content_sub"`
  46. BannerUrl string `description:"详情页banner" json:"banner_url"`
  47. ShareBgImg string `description:"分享背景图" json:"share_bg_img"`
  48. }
  49. type ReportChapterItem struct {
  50. ReportChapterId int `json:"report_chapter_id"`
  51. ReportId int `json:"report_id"`
  52. Title string `json:"title"`
  53. Abstract string `json:"abstract"`
  54. TypeId int `json:"type_id"`
  55. TypeName string `json:"type_name"`
  56. Trend string `json:"trend"`
  57. ReportChapterTypeName string `json:"report_chapter_type_name"`
  58. PublishTime time.Time `json:"publish_time"`
  59. Content string `description:"内容" json:"content"`
  60. ContentSub string `description:"内容前两个章节" json:"content_sub"`
  61. VideoUrl string `json:"video_url"` //音频文件URL
  62. VideoName string `json:"video_name"` //音频文件名称
  63. VideoPlaySeconds string `json:"video_play_seconds"` //音频播放时长
  64. VideoSize string `json:"video_size"`
  65. VideoImg string `description:"音频播放条的图片" json:"video_img"`
  66. Author string `description:"作者" json:"author"`
  67. Stage int `description:"期数" json:"stage"`
  68. ClassifyIdFirst int `description:"一级分类id" json:"classify_id_first"`
  69. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  70. ShareBgImg string `description:"分享背景图" json:"share_bg_img"`
  71. }
  72. type ReportChapterDetail struct {
  73. ReportChapterItem *ReportChapterItem `json:"report_chapter_item"`
  74. PermissionCheck *PermissionCheckInfo `json:"permission_check"`
  75. ReportChapterMenuList []*ReportChapterMenu `json:"report_chapter_menu_list"`
  76. AuthOk bool `json:"auth_ok"`
  77. LikeNum int64 `description:"点赞总数" json:"like_num"`
  78. LikeEnabled int8 `description:"是否已点赞: 0-未点赞 1-已点赞" json:"like_enabled"`
  79. CollectionId int `description:"收藏ID: 大于0则表示已收藏" json:"collection_id"`
  80. }
  81. type ReportChapterMenu struct {
  82. ReportChapterId int `json:"report_chapter_id"`
  83. ReportId int `json:"report_id"`
  84. ReportChapterTypeName string `json:"report_chapter_type_name"`
  85. ReportChapterTypeThumb string `json:"report_chapter_type_thumb"`
  86. PcSelectedThumb string `json:"pc_selected_thumb"`
  87. PcUnselectedThumb string `json:"pc_unselected_thumb"`
  88. Sort int `json:"sort"`
  89. }
  90. type ReportListItem struct {
  91. ReportId int `description:"报告Id" json:"report_id"`
  92. ClassifyIdFirst int `description:"一级分类id" json:"classify_id_first"`
  93. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  94. ClassifyIdSecond int `description:"二级分类id" json:"classify_id_second"`
  95. ClassifyNameSecond string `description:"二级分类名称" json:"classify_name_second"`
  96. Title string `description:"标题" json:"title"`
  97. Abstract string `description:"摘要" json:"abstract"`
  98. Author string `description:"作者" json:"author"`
  99. ReportImgUrl string `description:"作者头像" json:"report_img_url"`
  100. PublishTime time.Time `description:"发布时间" json:"publish_time"`
  101. Stage int `description:"期数" json:"stage"`
  102. VideoList []*VideoListItem `json:"video_list"`
  103. AuthOk bool `json:"auth_ok"`
  104. TitleInfo string `json:"title_info"`
  105. }
  106. type VideoListItem struct {
  107. VideoUrl string `description:"音频文件URL" json:"video_url"`
  108. Sort int `description:"音频内容排序" json:"sort"`
  109. VideoName string `json:"video_name"` //音频文件名称
  110. VideoPlaySeconds string `json:"video_play_seconds"` //音频播放时长
  111. VideoImg string `json:"video_img"` // 音频播放条前面展示的图片
  112. }
  113. type ReportList struct {
  114. Paging *PagingItem `json:"paging"`
  115. List []*ReportListItem `json:"list"`
  116. }
  117. type ReportCollectListItem struct {
  118. ReportId int `description:"报告Id" json:"report_id"`
  119. ReportChapterId int `json:"report_chapter_id"`
  120. ClassifyIdFirst int `description:"一级分类id" json:"classify_id_first"`
  121. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  122. ClassifyIdSecond int `description:"二级分类id" json:"classify_id_second"`
  123. ClassifyNameSecond string `description:"二级分类名称" json:"classify_name_second"`
  124. ReportChapterTypeId int `json:"report_chapter_type_id"`
  125. PublishTime time.Time `description:"发布时间" json:"publish_time"`
  126. Title string `description:"标题" json:"title"`
  127. ContentSub string `description:"内容前两个章节" json:"content_sub"`
  128. }
  129. type ReportCollectList struct {
  130. Date string `json:"date"`
  131. SubList []*ReportCollectListItem `json:"sub_list"`
  132. }
  133. type ReportCollectResp struct {
  134. Paging *PagingItem `json:"paging"`
  135. List []*ReportCollectList `json:"list"`
  136. }
  137. type ReportSearchResp struct {
  138. Paging *PagingItem `json:"paging"`
  139. List []*ReportCollectListItem `json:"list"`
  140. }
  141. type EsReportItem struct {
  142. Author string `description:"作者"`
  143. BodyContent string `description:"内容"`
  144. Categories string `description:"品种名称"`
  145. ClassifyIdFirst int `description:"一级分类id"`
  146. ClassifyNameFirst string `description:"一级分类名称"`
  147. ClassifyIdSecond int `description:"二级分类id"`
  148. ClassifyNameSecond string `description:"二级分类名称"`
  149. PublishState int `description:"1:未发布,2:已发布"`
  150. PublishTime string `description:"发布时间"`
  151. ReportChapterId int `description:"报告章节Id"`
  152. ReportId int `description:"报告Id"`
  153. Title string `description:"标题"`
  154. Abstract string `description:"摘要"`
  155. StageStr string `description:"期数"`
  156. }
  157. type TickerDataItem struct {
  158. Date string `json:"date"`
  159. Ticker string `json:"ticker"`
  160. BaseColumnName string `json:"base_column_name"`
  161. TickerValue float64 `json:"ticker_value"`
  162. LastValue float64 `json:"last_value"`
  163. DdValue float64 `json:"dd_value"`
  164. WwValue float64 `json:"ww_value"`
  165. MmValue float64 `json:"mm_value"`
  166. }
  167. type TickerTitleData struct {
  168. TickerTitle string `json:"ticker_title"`
  169. ReportChapterTypeId int `json:"report_chapter_type_id"`
  170. ReportChapterTypeName string `json:"report_chapter_type_name"`
  171. DataTableImage string `json:"data_table_image"`
  172. }
  173. type TickerData struct {
  174. List []*TickerDataItem `json:"list"`
  175. TickerTitle *TickerTitleData `json:"ticker_title"`
  176. }
  177. type ReportCollectListResp []*ReportCollectList
  178. func (p ReportCollectListResp) Len() int {
  179. return len(p)
  180. }
  181. func (p ReportCollectListResp) Less(i, j int) bool {
  182. return p[i].Date > p[j].Date
  183. }
  184. func (p ReportCollectListResp) Swap(i, j int) {
  185. p[i], p[j] = p[j], p[i]
  186. }
  187. type ReportChapterList []*ReportChapterListItem
  188. func (r ReportChapterList) Len() int {
  189. return len(r)
  190. }
  191. func (r ReportChapterList) Less(i, j int) bool {
  192. return r[i].Sort < r[j].Sort
  193. }
  194. func (r ReportChapterList) Swap(i, j int) {
  195. r[i], r[j] = r[j], r[i]
  196. }
  197. type ReportChapterMenuList []*ReportChapterMenu
  198. func (rc ReportChapterMenuList) Len() int {
  199. return len(rc)
  200. }
  201. func (rc ReportChapterMenuList) Less(i, j int) bool {
  202. return rc[i].Sort < rc[j].Sort
  203. }
  204. func (rc ReportChapterMenuList) Swap(i, j int) {
  205. rc[i], rc[j] = rc[j], rc[i]
  206. }
  207. type ReportVarietyResp struct {
  208. Paging *PagingItem `json:"paging"`
  209. List []*VarietyReportItem `json:"list"`
  210. }
  211. type VarietyReportItem struct {
  212. ReportId int `json:"report_id"`
  213. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  214. ClassifyNameSecond string `description:"二级分类名称" json:"classify_name_second"`
  215. Title string `description:"标题" json:"title"`
  216. Abstract string `description:"摘要" json:"abstract"`
  217. Author string `description:"作者" json:"author"`
  218. Frequency string `description:"频度" json:"frequency"`
  219. PublishTime time.Time `description:"发布时间" json:"publish_time"`
  220. Stage int `description:"期数" json:"stage"`
  221. Content string `description:"内容" json:"content"`
  222. VideoUrl string `description:"音频文件URL" json:"video_url"`
  223. VideoName string `description:"音频文件名称" json:"video_name"`
  224. VideoSize string `description:"音频文件大小,单位M" json:"video_size"`
  225. VideoPlaySeconds string `description:"音频播放时长" json:"video_play_seconds"`
  226. VideoImg string `description:"音频播放条的图片" json:"video_img"`
  227. ContentSub string `description:"内容前两个章节" json:"content_sub"`
  228. BannerUrl string `description:"详情页banner" json:"banner_url"`
  229. ShareBgImg string `description:"分享背景图" json:"share_bg_img"`
  230. AuthOk bool `json:"auth_ok"`
  231. }