refactor: reorganize modules and add Linux build tooling
This commit is contained in:
150
module/social/relation/proto/friend.proto
Normal file
150
module/social/relation/proto/friend.proto
Normal file
@@ -0,0 +1,150 @@
|
||||
syntax = "proto3";
|
||||
package relation;
|
||||
option go_package = ".;relation";
|
||||
import "blocks.proto";
|
||||
|
||||
// relation-关系管理:好友
|
||||
service Friend{
|
||||
/** 基础操作 **/
|
||||
|
||||
//搜索
|
||||
rpc Search(SearchRequest) returns (PartFriendReply);
|
||||
|
||||
//获取好友列表
|
||||
rpc Fetch(VersionRequest) returns (FriendsReply);
|
||||
|
||||
//获取用户信息卡片
|
||||
rpc Get(IdentRequest) returns (RelationItem);
|
||||
|
||||
//修改好友备注名称,如果要清除备注,直接nickname传空值
|
||||
rpc ModifyNickname(ModifyNicknameRequest) returns (StatusReply);
|
||||
|
||||
//受你欢迎的,置顶
|
||||
rpc DoPopular(IdentRequest) returns (StatusReply);
|
||||
|
||||
//取消受欢迎的,取消置顶
|
||||
rpc UndoPopular(IdentRequest) returns (StatusReply);
|
||||
|
||||
//删除好友
|
||||
rpc Delete(IdentRequest) returns (StatusReply);
|
||||
|
||||
/** 好友申请管理 **/
|
||||
|
||||
//好友申请列表
|
||||
rpc ApplyFetch(VersionRequest) returns (ApplyFetchReply);
|
||||
|
||||
//好友申请详情
|
||||
rpc ApplyGet(IdentRequest) returns (FriendApplyGetReply);
|
||||
|
||||
//好友申请
|
||||
rpc ApplyDo(ApplyDoRequest) returns (StatusReply);
|
||||
|
||||
//好友申请Do:留言
|
||||
rpc ApplyDoMessage(ApplyMessageRequest) returns (StatusReply);
|
||||
|
||||
//好友申请Do:确认
|
||||
rpc ApplyDoPass(ApplyDoPassRequest) returns (StatusReply);
|
||||
|
||||
//好友申请Do:拒绝
|
||||
rpc ApplyDoReject(IdentRequest) returns (StatusReply);
|
||||
|
||||
/** 好友标签管理 **/
|
||||
|
||||
//获取标签列表
|
||||
rpc TagFetch(Empty) returns (FriendTagsReply);
|
||||
|
||||
//获取标签成员
|
||||
rpc TagMemberFetch(IdentRequest) returns (PartFriendReply);
|
||||
|
||||
//创建标签
|
||||
rpc TagDoCreate(TagDoCreateRequest) returns (StatusReply);
|
||||
|
||||
//更新标签成员
|
||||
rpc TagDoUpdate(TagDoUpdateRequest) returns (StatusReply);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
message ApplyFetchReply {
|
||||
int32 total=1; // 总记录数
|
||||
int64 version=2; //版本号
|
||||
repeated ApplyItem applys=3;
|
||||
}
|
||||
|
||||
message ApplyItem {
|
||||
string identity=1; // 唯一标识
|
||||
RelationItem from=2;
|
||||
MessageItem message=3;
|
||||
string created_at=4; //时间
|
||||
int32 status =5; // 状态
|
||||
}
|
||||
|
||||
message ApplyDoRequest {
|
||||
int64 to_id = 1; // 目标人的唯一ID
|
||||
string to_identity=2; //目标人的唯一标识
|
||||
string body=3; //留言正文
|
||||
}
|
||||
|
||||
message ApplyDoPassRequest{
|
||||
int64 friend_relation_id = 1; // 为将要通过的好友会员通行证唯一ID
|
||||
string friend_relation_identity = 2; // 为将要通过的好友会员通行证唯一Identity
|
||||
string apply_identity = 3; // 申请的唯一标识
|
||||
}
|
||||
|
||||
message ApplyMessageRequest {
|
||||
int64 apply_id = 1; // 申请ID
|
||||
string body=2; //留言正文
|
||||
}
|
||||
|
||||
message PartFriendReply {
|
||||
int32 total=1; // 总记录数
|
||||
int64 version=2; //版本号
|
||||
repeated RelationItem friends=4; //好友信息
|
||||
}
|
||||
|
||||
message FriendsReply {
|
||||
int32 total=1; // 总记录数
|
||||
int64 version=2; //版本号
|
||||
repeated TagItem tags=3; //分组标签信息
|
||||
repeated RelationItem friends=4; //好友信息
|
||||
}
|
||||
|
||||
message FriendApplyGetReply{
|
||||
RelationItem data=1; // 会员信息卡片
|
||||
repeated MessageItem message=2; //聊天记录
|
||||
}
|
||||
|
||||
message MessageItem {
|
||||
string relation_identity=1; //发送者
|
||||
string body=2; //正文
|
||||
string created_at=3; //时间
|
||||
}
|
||||
|
||||
message ModifyNicknameRequest{
|
||||
string identity=1; // 会员唯一标识
|
||||
string nickname=2; // 新的备注名称
|
||||
}
|
||||
|
||||
message FriendTagsReply {
|
||||
int64 total=1; // 总记录数
|
||||
repeated TagItem data=2;
|
||||
}
|
||||
|
||||
message TagItem {
|
||||
int64 id=1;//好友标签ID
|
||||
string identity=2; // 标签唯一标识
|
||||
int64 friend_total=3; // 标签成员统计
|
||||
string tag_name=4; // 标签名称
|
||||
}
|
||||
|
||||
message TagDoCreateRequest{
|
||||
string tag_name=1; // 标签名称
|
||||
repeated string friend_identity=2; //成员identity
|
||||
}
|
||||
|
||||
message TagDoUpdateRequest{
|
||||
string tag_identity=1; // 标签唯一标识
|
||||
string friend_identity=2; //成员identity
|
||||
string direction=3; //操作方式:ADD增加成员,DEL删除成员
|
||||
}
|
||||
Reference in New Issue
Block a user