report.go 9.0 KB

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