recommend.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package recommend
  2. import (
  3. "encoding/json"
  4. tag "go-common/app/interface/main/tag/model"
  5. "go-common/app/service/main/archive/api"
  6. )
  7. type Item struct {
  8. ID int64 `json:"id,omitempty"`
  9. Name string `json:"name,omitempty"`
  10. Goto string `json:"goto,omitempty"` // goto: av, live, bangumi, topic, activity, ad
  11. TagID int64 `json:"tid,omitempty"`
  12. From int8 `json:"from,omitempty"`
  13. Source string `json:"source,omitempty"`
  14. AvFeature json.RawMessage `json:"av_feature,omitempty"`
  15. Config *Config `json:"config,omitempty"`
  16. RcmdReason *RcmdReason `json:"rcmd_reason,omitempty"`
  17. StatType int8 `json:"stat_type,omitempty"`
  18. Items []*Item `json:"-"`
  19. Archive *api.Arc `json:"archive,omitempty"`
  20. Tag *tag.Tag `json:"tag,omitempty"`
  21. Limit int `json:"-"`
  22. }
  23. type Config struct {
  24. URI string `json:"uri,omitempty"`
  25. Title string `json:"title,omitempty"`
  26. Cover string `json:"cover,omitempty"`
  27. Content string `json:"content,omitempty"`
  28. Subtitle string `json:"subtitle,omitempty"`
  29. }
  30. type RcmdReason struct {
  31. ID int `json:"id"`
  32. Content string `json:"content"`
  33. BgColor string `json:"bg_color"`
  34. IconLocation string `json:"icon_location"`
  35. Style int `json:"style"`
  36. Font int `jsn:"font"`
  37. Position string `jsn:"position"`
  38. Grounding string `jsn:"grounding"`
  39. }