report.go 12 KB

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