Skip to content

Commit

Permalink
refactor: 粉丝与关注
Browse files Browse the repository at this point in the history
  • Loading branch information
fuqihao.foliet committed Dec 15, 2023
1 parent ed613e5 commit b957daa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 17 deletions.
24 changes: 24 additions & 0 deletions meowchat/core_api/common.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
syntax = "proto3";

package meowchat.core_api;

option go_package = "meowchat/core_api";
option java_package = "com.xhpolaris.idlgen.meowchat.coreapi";
option java_outer_classname = "CommonProto";
option java_multiple_files = true;

import "meowchat/system/common.proto";

message User {
string id = 1;
string nickname = 2;
string avatarUrl = 3;
optional string motto = 4;
optional int64 follower = 5;
optional int64 following = 6;
optional int64 article = 7;
optional int64 like = 8;
optional bool isFollowing = 9;
repeated system.Role roles = 10;
optional bool enableDebug = 11;
}
5 changes: 3 additions & 2 deletions meowchat/core_api/like.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import "meowchat/user/common.proto";
import "meowchat/core_api/moment.proto";
import "meowchat/core_api/post.proto";
import "meowchat/core_api/comment.proto";
import "meowchat/core_api/common.proto";

message DoLikeReq {
string targetId = 1;
Expand Down Expand Up @@ -61,7 +62,7 @@ message GetLikedUsersReq {
}

message GetLikedUsersResp {
repeated user.UserPreview users = 1;
repeated core_api.User users = 1;
}

message GetUserLikeContentsReq {
Expand All @@ -72,7 +73,7 @@ message GetUserLikeContentsReq {

message GetUserLikeContentsResp {
repeated core_api.Moment moments = 1;
repeated user.UserPreview users = 2;
repeated core_api.User users = 2;
repeated core_api.Post posts = 3;
repeated core_api.Comment comments = 4;
int64 total = 5;
Expand Down
16 changes: 1 addition & 15 deletions meowchat/core_api/user.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,7 @@ option java_multiple_files = true;
import "basic/pagination.proto";

import "meowchat/user/common.proto";
import "meowchat/system/common.proto";

message User {
string id = 1;
string nickname = 2;
string avatarUrl = 3;
optional string motto = 4;
optional int64 follower = 5;
optional int64 following = 6;
optional int64 article = 7;
optional int64 like = 8;
optional bool isFollowing = 9;
repeated system.Role roles = 10;
optional bool enableDebug = 11;
}
import "meowchat/core_api/common.proto";

message GetUserInfoReq {
optional string userId = 1;
Expand Down

0 comments on commit b957daa

Please sign in to comment.