article.go 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package article
  2. import (
  3. model "go-common/app/interface/openplatform/article/model"
  4. "go-common/library/time"
  5. )
  6. // ArtParam param for article info input.
  7. type ArtParam struct {
  8. AID int64 `json:"aid"`
  9. MID int64 `json:"mid"`
  10. Category int64 `json:"category"`
  11. State int32 `json:"state"`
  12. Reprint int32 `json:"reprint"`
  13. TemplateID int32 `json:"tid"`
  14. Title string `json:"title"`
  15. BannerURL string `json:"banner_url"`
  16. Content string `json:"content"`
  17. Summary string `json:"summary"`
  18. Tags string `json:"tags"`
  19. ImageURLs []string `json:"image_urls"`
  20. OriginImageURLs []string `json:"origin_image_urls"`
  21. RealIP string `json:"-"`
  22. Action int `json:"action"`
  23. Words int64 `json:"words"`
  24. DynamicIntro string `json:"dynamic_intro"`
  25. ActivityID int64 `json:"activity_id"`
  26. }
  27. // Meta article detail.
  28. type Meta struct {
  29. ID int64 `json:"id"`
  30. Title string `json:"title"`
  31. Content string `json:"content"`
  32. Summary string `json:"summary"`
  33. BannerURL string `json:"banner_url"`
  34. Reason string `json:"reason"`
  35. TemplateID int32 `json:"template_id"`
  36. State int32 `json:"state"`
  37. Reprint int32 `json:"reprint"`
  38. ImageURLs []string `json:"image_urls"`
  39. OriginImageURLs []string `json:"origin_image_urls"`
  40. Tags []string `json:"tags"`
  41. Category *model.Category `json:"category"`
  42. Author *model.Author `json:"author"`
  43. Stats *model.Stats `json:"stats"`
  44. PTime time.Time `json:"publish_time"`
  45. CTime time.Time `json:"ctime"`
  46. MTime time.Time `json:"mtime"`
  47. ViewURL string `json:"view_url"`
  48. EditURL string `json:"edit_url"`
  49. IsPreview int `json:"is_preview"`
  50. DynamicIntro string `json:"dynamic_intro"`
  51. }
  52. // ArtList article for list.
  53. type ArtList struct {
  54. Articles []*Meta `json:"articles"`
  55. Type *model.CreationArtsType `json:"type"`
  56. Page *model.ArtPage `json:"page"`
  57. }
  58. // DraftList draft list.
  59. type DraftList struct {
  60. Drafts []*Meta `json:"drafts"`
  61. Page *model.ArtPage `json:"page"`
  62. DraftURL string `json:"draft_url"`
  63. }