This repository has been archived by the owner on Aug 19, 2023. It is now read-only.
forked from Toktik-Team/toktik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelation.proto
102 lines (80 loc) · 2.57 KB
/
relation.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
syntax = "proto3";
package douyin.user;
option go_package = "douyin/relation";
import "user.proto";
message RelationActionRequest {
uint32 actor_id = 1; // 当前登录用户
uint32 user_id = 2; // 对方用户id
}
message RelationActionResponse {
uint32 status_code = 1; // 状态码,0-成功,其他值-失败
string status_msg = 2; // 返回状态描述
}
message FollowListRequest {
uint32 actor_id = 1; // 当前登录用户id
uint32 user_id = 2; // 对方用户id
}
message FollowListResponse {
int32 status_code = 1; // 状态码,0-成功,其他值-失败
string status_msg = 2; // 返回状态描述
repeated User user_list = 3; // 用户信息列表
}
message CountFollowListRequest {
uint32 user_id = 1; // 用户id
}
message CountFollowListResponse {
int32 status_code = 1; // 状态码,0-成功,其他值-失败
string status_msg = 2; // 返回状态描述
uint32 count = 3; // 关注数
}
message FollowerListRequest {
uint32 actor_id = 1; // 当前登录用户id
uint32 user_id = 2; // 对方用户id
}
message FollowerListResponse {
int32 status_code = 1; // 状态码,0-成功,其他值-失败
string status_msg = 2; // 返回状态描述
repeated User user_list = 3; // 用户列表
}
message CountFollowerListRequest {
uint32 user_id = 1; // 用户id
}
message CountFollowerListResponse {
int32 status_code = 1; // 状态码,0-成功,其他值-失败
string status_msg = 2; // 返回状态描述
uint32 count = 3; // 粉丝数
}
message FriendListRequest {
uint32 actor_id = 1; // 当前登录用户id
uint32 user_id = 2; // 对方用户id
}
message FriendListResponse {
int32 status_code = 1; // 状态码,0-成功,其他值-失败
string status_msg = 2; // 返回状态描述
repeated User user_list = 3; // 用户列表
}
message IsFollowRequest {
uint32 actor_id = 1;
uint32 user_id = 2;
}
message IsFollowResponse {
bool result = 1; // 结果
}
service RelationService {
rpc Follow (RelationActionRequest) returns (RelationActionResponse) {
}
rpc Unfollow (RelationActionRequest) returns (RelationActionResponse) {
}
rpc GetFollowList (FollowListRequest) returns (FollowListResponse) {
}
rpc CountFollowList (CountFollowListRequest) returns (CountFollowListResponse) {
}
rpc GetFollowerList (FollowerListRequest) returns (FollowerListResponse) {
}
rpc CountFollowerList (CountFollowerListRequest) returns (CountFollowerListResponse) {
}
rpc GetFriendList (FriendListRequest) returns (FriendListResponse) {
}
rpc IsFollow (IsFollowRequest) returns (IsFollowResponse) {
}
}