hotspots.go 888 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package model
  2. // hotspot type
  3. const (
  4. HotspotTypeView = 0
  5. HotspotTypePtime = 1
  6. )
  7. // HotspotTypes types
  8. var HotspotTypes = [...]int8{HotspotTypeView, HotspotTypePtime}
  9. // Hotspot model
  10. type Hotspot struct {
  11. ID int64 `json:"id"`
  12. Tag string `json:"tag"`
  13. Title string `json:"title"`
  14. TopArticles []int64 `json:"top_articles"`
  15. Icon bool `json:"icon"`
  16. Stats HotspotStats `json:"stats"`
  17. }
  18. // HotspotStats .
  19. type HotspotStats struct {
  20. Read int64 `json:"read"`
  21. Reply int64 `json:"reply"`
  22. Count int64 `json:"count"`
  23. }
  24. // SearchArt search article model
  25. type SearchArt struct {
  26. ID int64
  27. PublishTime int64
  28. Tags []string
  29. StatsView int64
  30. StatsReply int64
  31. }
  32. // HotspotResp model
  33. type HotspotResp struct {
  34. Hotspot *Hotspot `json:"hotspot"`
  35. Articles []*MetaWithLike `json:"articles"`
  36. }