search.go 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. package model
  2. // SearchMemberResult is.
  3. type SearchMemberResult struct {
  4. Order string `json:"order"`
  5. Sort string `json:"sort"`
  6. Result []struct {
  7. Mid int64 `json:"mid"`
  8. Name string `json:"name"`
  9. } `json:"result"`
  10. Page Page `json:"page"`
  11. }
  12. // Mids is.
  13. func (r *SearchMemberResult) Mids() []int64 {
  14. mids := make([]int64, 0, len(r.Result))
  15. for _, r := range r.Result {
  16. mids = append(mids, r.Mid)
  17. }
  18. return mids
  19. }
  20. // Pagination is.
  21. func (r *SearchMemberResult) Pagination() *CommonPagination {
  22. return &CommonPagination{
  23. Page: r.Page,
  24. }
  25. }
  26. // SearchUserPropertyReviewResult is.
  27. type SearchUserPropertyReviewResult struct {
  28. Order string `json:"order"`
  29. Sort string `json:"sort"`
  30. Result []struct {
  31. ID int64 `json:"id"`
  32. } `json:"result"`
  33. Page Page `json:"page"`
  34. }
  35. // IDs is.
  36. func (r *SearchUserPropertyReviewResult) IDs() []int64 {
  37. ids := make([]int64, 0, len(r.Result))
  38. for _, r := range r.Result {
  39. ids = append(ids, r.ID)
  40. }
  41. return ids
  42. }
  43. // Total is.
  44. func (r *SearchUserPropertyReviewResult) Total() int {
  45. return r.Page.Total
  46. }
  47. // SearchLogResult is.
  48. type SearchLogResult struct {
  49. Order string `json:"order"`
  50. Sort string `json:"sort"`
  51. Result []AuditLog `json:"result"`
  52. Page Page `json:"page"`
  53. }
  54. // AuditLog is.
  55. type AuditLog struct {
  56. UID int64 `json:"uid"`
  57. Uname string `json:"uname"`
  58. OID int64 `json:"oid"`
  59. Type int8 `json:"type"`
  60. Action string `json:"action"`
  61. Str0 string `json:"str_0"`
  62. Str1 string `json:"str_1"`
  63. Str2 string `json:"str_2"`
  64. Int0 int `json:"int_0"`
  65. Int1 int `json:"int_1"`
  66. Int2 int `json:"int_2"`
  67. Ctime string `json:"ctime"`
  68. Extra string `json:"extra_data"`
  69. }