up_card.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. package model
  2. import "go-common/library/time"
  3. //ListUpCardInfoArg arg
  4. type ListUpCardInfoArg struct {
  5. Pn uint `form:"pn"` // page num
  6. Ps uint `form:"ps"` // query size
  7. }
  8. //UpCardInfoPage page result of card info
  9. type UpCardInfoPage struct {
  10. Cards map[int64]*UpCard `json:"cards"`
  11. Page *Pager `json:"page"`
  12. }
  13. //GetCardByMidArg arg
  14. type GetCardByMidArg struct {
  15. Mid int64 `form:"mid" validate:"required"`
  16. }
  17. //ListCardByMidsArg arg
  18. type ListCardByMidsArg struct {
  19. Mids string `form:"mids" validate:"required"` // mids split by ","
  20. }
  21. //UpCard up card content
  22. type UpCard struct {
  23. UpCardInfo *UpCardInfo `json:"up_card_info"`
  24. Accounts []*UpCardAccount `json:"accounts"`
  25. Videos []*UpCardVideo `json:"videos"`
  26. Images []*UpCardImage `json:"images"`
  27. }
  28. //UpCardInfo for up info in card info
  29. type UpCardInfo struct {
  30. MID int64 `json:"mid"`
  31. NameCN string `json:"name_cn"`
  32. NameEN string `json:"name_en"`
  33. NameAlias string `json:"name_alias"`
  34. Signature string `json:"signature"`
  35. Content string `json:"content"`
  36. Nationality string `json:"nationality"`
  37. Nation string `json:"nation"`
  38. Gender string `json:"gender"`
  39. BloodType string `json:"blood_type"`
  40. Constellation string `json:"constellation"`
  41. Height int `json:"height"`
  42. Weight int `json:"weight"`
  43. BirthPlace string `json:"birth_place"`
  44. BirthDate time.Time `json:"birth_date"`
  45. Occupation string `json:"occupation"`
  46. Tags string `json:"tags"`
  47. Masterpieces string `json:"masterpieces"`
  48. School string `json:"school"`
  49. Location string `json:"location"`
  50. Interests string `json:"interests"`
  51. Platform string `json:"platform"`
  52. PlatformAccount string `json:"platform_account"`
  53. }
  54. //UpCardAccount for accounts in card info
  55. type UpCardAccount struct {
  56. URL string `json:"url"`
  57. Title string `json:"title"`
  58. Desc string `json:"desc"`
  59. Picture string `json:"picture"`
  60. }
  61. //UpCardImage for images in card info
  62. type UpCardImage struct {
  63. URL string `json:"url"`
  64. Width int `json:"width"`
  65. Height int `json:"height"`
  66. }
  67. //UpCardVideo for videos in card info
  68. type UpCardVideo struct {
  69. URL string `json:"url"`
  70. Title string `json:"title"`
  71. Picture string `json:"picture"`
  72. Duration int64 `json:"duration"`
  73. CTime time.Time `json:"ctime"`
  74. }