refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,35 +1,35 @@
|
||||
syntax = "proto3";
|
||||
package feed;
|
||||
option go_package =".;feed";
|
||||
import "blocks.proto";
|
||||
option go_package = "bsm/full/module/social/feed/pb;feed";
|
||||
import "protobuf/blocks.proto";
|
||||
|
||||
// 推文相关操作
|
||||
service Post{
|
||||
|
||||
// 推文列表
|
||||
rpc Fetch(FetchRequest) returns (PostListReply){};
|
||||
rpc Fetch(blocks.FetchRequest) returns (blocks.FeedPostListReply){};
|
||||
// 新建推文
|
||||
rpc Create (PostItem) returns (StatusReply){};
|
||||
rpc Create (blocks.FeedPostItem) returns (blocks.DataStatusReply){};
|
||||
// 修改推文
|
||||
rpc Change (PostItem) returns (StatusReply){};
|
||||
rpc Change (blocks.FeedPostItem) returns (blocks.DataStatusReply){};
|
||||
// 删除推文
|
||||
rpc Remove (IdentRequest) returns (StatusReply){};
|
||||
rpc Remove (blocks.IdentRequest) returns (blocks.DataStatusReply){};
|
||||
|
||||
// 评论列表
|
||||
rpc CommentList (FetchRequest) returns (CommentListReply){};
|
||||
rpc CommentList (blocks.FetchRequest) returns (CommentListReply){};
|
||||
// 新建评论
|
||||
rpc AddComment (CommentItem) returns (StatusReply){};
|
||||
rpc AddComment (CommentItem) returns (blocks.DataStatusReply){};
|
||||
// 删除评论
|
||||
rpc DeleteComment (IdentRequest) returns (StatusReply){};
|
||||
rpc DeleteComment (blocks.IdentRequest) returns (blocks.DataStatusReply){};
|
||||
|
||||
// 计数操作
|
||||
rpc Action (PostActionRequest) returns (StatusReply){};
|
||||
rpc Action (PostActionRequest) returns (blocks.DataStatusReply){};
|
||||
}
|
||||
|
||||
// 推文评论列表
|
||||
message CommentListReply{
|
||||
repeated CommentItem list = 1; // 评论列表
|
||||
int64 total = 2;
|
||||
int64 total = 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,15 +37,15 @@ message CommentItem{
|
||||
string identity = 1; // 评论identity
|
||||
string post_identity = 2; // 被评论唯一标识
|
||||
string feed_identity=3; // 评论人唯一标识
|
||||
string content = 4; // 评论内容
|
||||
repeated CommentItem sub_comment =5; // 子评论
|
||||
|
||||
string content = 4; // 评论内容
|
||||
repeated CommentItem sub_comment =5; // 子评论
|
||||
|
||||
}
|
||||
|
||||
message PostActionRequest{
|
||||
string action_op=1; //操作运作:ilike,unlike
|
||||
string action_type=2; //类别:推文,评论
|
||||
string identity = 3; // 唯一标识
|
||||
string identity = 3; // 唯一标识
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user