report.go 12 KB

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