report.go 9.9 KB

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