report.go 9.7 KB

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