report.go 10 KB

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