Skip to content

Commit

Permalink
uint64全部改为使用int64
Browse files Browse the repository at this point in the history
  • Loading branch information
OrionLi committed Aug 27, 2023
1 parent 52968e9 commit 6a0ba0e
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 39 deletions.
55 changes: 32 additions & 23 deletions pkg/pb/relation.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 26 additions & 16 deletions pkg/proto/relation.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,62 @@ service RelationService {
rpc GetFriendList (GetFriendListRequest) returns (GetFriendListResponse) {}
}

// 关系操作请求
message RelationActionRequest {
string token = 1;
uint64 to_user_id = 2;
int32 action_type = 3;
string token = 1; // 用户鉴权token
int64 to_user_id = 2; // 对方用户id
int32 action_type = 3; // 1-关注,2-取消关注
}

// 关系操作响应
message RelationActionResponse {
int32 status_code = 1;
string status_msg = 2;
}

// 获取关注列表请求
message GetFollowListRequest {
uint64 user_id = 1;
string token = 2;
int64 user_id = 1; // 用户id
string token = 2; // 用户鉴权token
}

// 获取关注列表响应
message GetFollowListResponse {
int32 status_code = 1;
string status_msg = 2;
repeated User user_list = 3;
repeated User user_list = 3; // 用户列表
}

// 获取粉丝列表请求
message GetFollowerListRequest {
uint64 user_id = 1;
string token = 2;
int64 user_id = 1; // 用户id
string token = 2; // 用户鉴权token
}

// 获取粉丝列表响应
message GetFollowerListResponse {
int32 status_code = 1;
string status_msg = 2;
repeated User user_list = 3;
repeated User user_list = 3; // 用户列表
}

// 获取好友列表请求
message GetFriendListRequest {
uint64 user_id = 1;
string token = 2;
int64 user_id = 1; // 用户id
string token = 2; // 用户鉴权token
}

// 获取好友列表响应
message GetFriendListResponse {
int32 status_code = 1;
string status_msg = 2;
repeated FriendUser user_list = 3;
repeated FriendUser user_list = 3; // 好友用户列表
}

// 好友用户信息
message FriendUser {
User user = 1;
string message = 2;
int32 msg_type = 3;
}
User user = 1; // 用户信息
string message = 2; // 最新聊天消息
int32 msg_type = 3; // 消息类型,0=接收的消息,1=发送的消息
}

0 comments on commit 6a0ba0e

Please sign in to comment.