classify.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package pc
  2. import (
  3. "hongze/hongze_yb/models/response"
  4. "hongze/hongze_yb/models/tables/rddp/customer_comment"
  5. "hongze/hongze_yb/models/tables/yb_activity"
  6. )
  7. type ClassifyListItem struct {
  8. ClassifyIdSecond int `json:"classify_id_second"`
  9. ClassifyNameSecond string `json:"classify_name_second"`
  10. ParentId int `json:"parent_id"`
  11. ReportAuthor string `json:"report_author"`
  12. AuthorDescript string `json:"author_descript"`
  13. HomeImgUrl string `json:"home_img_url"`
  14. Stage int `description:"期数" json:"stage"`
  15. ProductName string `json:"product_name"`
  16. }
  17. type ClassifyDetail struct {
  18. ClassifyListItem
  19. Comments []*customer_comment.CustomerComment
  20. AvatarImgUrl string `json:"avatar_img_url"`
  21. Abstract string `json:"abstract"`
  22. Descript string `json:"descript"`
  23. PermissionCheck *response.PermissionCheckInfo `json:"permission_check"`
  24. AuthOk bool `json:"auth_ok"`
  25. VipTitle string `json:"vip_title"'`
  26. }
  27. type ClassifyFirstListItem struct {
  28. ClassifyIdFirst int `description:"一级分类id" json:"classify_id_first"`
  29. Latest int `description:"最新更新" json:"latest"`
  30. ClassifyIdSecond int `json:"classify_id_second"`
  31. ClassifyNameFirst string `description:"一级分类名称" json:"classify_name_first"`
  32. ClassifyNameSecond string `json:"classify_name_second"`
  33. BackImgUrl string `json:"back_img_url"`
  34. Sort int `json:"sort"`
  35. RedirectType int `description:"跳转页面类型:1,专栏列表,2报告列表,3专栏详情" json:"redirect_type"`
  36. }
  37. type ClassifyFirstList []*ClassifyFirstListItem
  38. func (c ClassifyFirstList) Len() int {
  39. return len(c)
  40. }
  41. func (c ClassifyFirstList) Less(i, j int) bool {
  42. return c[i].Sort < c[j].Sort
  43. }
  44. func (c ClassifyFirstList) Swap(i, j int) {
  45. c[i], c[j] = c[j], c[i]
  46. }
  47. type LatestReleaseResp struct {
  48. ActivityOrReport int `description:"活动或专栏:0,活动,1,专栏" json:"redirect_type"`
  49. Activity *yb_activity.YbActivity
  50. ReportId int
  51. ClassifyIdSecond int
  52. ImgUrl string
  53. }