model.proto 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. syntax = "proto3";
  2. package account.service.relation;
  3. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  4. option go_package = "model";
  5. option (gogoproto.goproto_enum_prefix_all) = false;
  6. option (gogoproto.goproto_getters_all) = false;
  7. option (gogoproto.unmarshaler_all) = true;
  8. option (gogoproto.marshaler_all) = true;
  9. option (gogoproto.sizer_all) = true;
  10. message Tag {
  11. int64 id = 1 [(gogoproto.jsontag) = "id"];
  12. string name = 2 [(gogoproto.jsontag) = "name"];
  13. int64 status = 3 [(gogoproto.jsontag) = "status"];
  14. int64 ctime = 4 [(gogoproto.jsontag) = "-", (gogoproto.casttype) = "go-common/library/time.Time", (gogoproto.customname) = "CTime"];
  15. int64 mtime = 5 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time", (gogoproto.customname) = "MTime"];
  16. }
  17. message Tags {
  18. map<int64,Tag> tags= 1 ;
  19. }
  20. message TagUser {
  21. int64 fid = 1 [(gogoproto.jsontag) = "fid"];
  22. repeated int64 tag = 2 [(gogoproto.jsontag) = "tag"];
  23. int64 ctime = 3 [(gogoproto.jsontag) = "-", (gogoproto.casttype) = "go-common/library/time.Time", (gogoproto.customname) = "CTime"];
  24. int64 mtime = 4 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time", (gogoproto.customname) = "MTime"];
  25. }
  26. message TagCount {
  27. int64 tagid = 1 [(gogoproto.jsontag) = "tagid"];
  28. string name = 2 [(gogoproto.jsontag) = "name"];
  29. int64 count = 3 [(gogoproto.jsontag) = "count"];
  30. }
  31. message TagCountList {
  32. repeated TagCount tag_count_list = 1;
  33. }
  34. message Following {
  35. int64 mid = 1 [(gogoproto.jsontag) = "mid"];
  36. uint32 attribute = 2 [(gogoproto.jsontag) = "attribute"];
  37. uint32 source = 3 [(gogoproto.jsontag) = "-"];
  38. int64 ctime = 4 [(gogoproto.jsontag) = "-", (gogoproto.casttype) = "go-common/library/time.Time", (gogoproto.customname) = "CTime"];
  39. int64 mtime = 5 [(gogoproto.jsontag) = "mtime", (gogoproto.casttype) = "go-common/library/time.Time", (gogoproto.customname) = "MTime"];
  40. repeated int64 tag = 6 [(gogoproto.jsontag) = "tag"];
  41. int32 special = 7 [(gogoproto.jsontag) = "special"];
  42. }
  43. message FollowingList {
  44. repeated Following following_list = 1;
  45. }
  46. message Stat {
  47. int64 mid = 1 [(gogoproto.jsontag) = "mid"];
  48. int64 following = 2 [(gogoproto.jsontag) = "following"];
  49. int64 whisper = 3 [(gogoproto.jsontag) = "whisper"];
  50. int64 black = 4 [(gogoproto.jsontag) = "black"];
  51. int64 follower = 5 [(gogoproto.jsontag) = "follower"];
  52. int64 ctime = 6 [(gogoproto.jsontag) = "-", (gogoproto.casttype) = "go-common/library/time.Time", (gogoproto.customname) = "CTime"];
  53. int64 mtime = 7 [(gogoproto.jsontag) = "-", (gogoproto.casttype) = "go-common/library/time.Time", (gogoproto.customname) = "MTime"];
  54. }
  55. message FollowingTags {
  56. uint32 attr = 1 [(gogoproto.jsontag) = "attr"];
  57. int64 ts = 2 [(gogoproto.jsontag) = "ts", (gogoproto.casttype) = "go-common/library/time.Time"];
  58. repeated int64 tag_ids = 3 [(gogoproto.jsontag) = "tag"];
  59. int32 special =4 [(gogoproto.jsontag) = "special"];
  60. }
  61. message GlobalRec {
  62. repeated int64 fids = 1 [(gogoproto.jsontag) = "fids"];
  63. }
  64. message RelationLog {
  65. int64 mid = 1 [(gogoproto.jsontag) = "mid"];
  66. int64 fid = 2 [(gogoproto.jsontag) = "fid"];
  67. int64 ts = 3 [(gogoproto.jsontag) = "ts"];
  68. uint32 source = 4 [(gogoproto.jsontag) = "source"];
  69. string ip = 5 [(gogoproto.jsontag) = "ip"];
  70. string buvid = 6 [(gogoproto.jsontag) = "buvid"];
  71. uint32 from_attr = 7 [(gogoproto.jsontag) = "from_attr"];
  72. uint32 to_attr = 8 [(gogoproto.jsontag) = "to_attr"];
  73. uint32 from_rev_attr = 9 [(gogoproto.jsontag) = "from_rev_attr"];
  74. uint32 to_rev_attr = 10 [(gogoproto.jsontag) = "to_rev_attr"];
  75. map<string, string> content = 11 [(gogoproto.jsontag) = "content"];
  76. }