Skip to content

Commit

Permalink
fix: 将like、share和follow结构的定义调整至message action内,避免生成go代码后命名冲突的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
universero committed Aug 7, 2024
1 parent b482800 commit e4bfe6a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 31 deletions.
53 changes: 28 additions & 25 deletions meowcloud/action/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,34 @@ enum TargetType {
USER = 3;
}

// 点赞
message Like {
string id = 1;
string targetId = 2;
TargetType targetType = 3;
string userId = 4;
int64 createAt = 5;
bool isCancel = 6;
}
message action {

// 分享
message Share {
string id = 1;
string targetId = 2;
TargetType targetType = 3;
string userId = 4;
int64 createAt = 5;
}
// 点赞
message Like {
string id = 1;
string targetId = 2;
TargetType targetType = 3;
string userId = 4;
int64 createAt = 5;
bool isCancel = 6;
}

// 分享
message Share {
string id = 1;
string targetId = 2;
TargetType targetType = 3;
string userId = 4;
int64 createAt = 5;
}

// 关注
message Follow {
string id = 1;
string targetId = 2;
TargetType targetType = 3;
string userId = 4;
int64 createAt = 5;
bool isCancel = 6;
// 关注
message Follow {
string id = 1;
string targetId = 2;
TargetType targetType = 3;
string userId = 4;
int64 createAt = 5;
bool isCancel = 6;
}
}
4 changes: 2 additions & 2 deletions meowcloud/action/follow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ message GetFollowedUsersReq {

// 获取关注对象列表响应
message GetFollowedUsersResp {
repeated Follow follows = 1;
repeated action.Follow follows = 1;
int64 total = 2;
}

Expand All @@ -69,7 +69,7 @@ message GetUserFollowedReq {

// 获取用户关注过对象响应
message GetUserFollowedResp {
repeated Follow follows = 1;
repeated action.Follow follows = 1;
int64 total = 2;
}

Expand Down
4 changes: 2 additions & 2 deletions meowcloud/action/like.proto
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ message GetLikedUsersReq {

// 获取点赞对象列表响应
message GetLikedUsersResp {
repeated Like likes = 1;
repeated action.Like likes = 1;
int64 total = 2;
}

Expand All @@ -69,7 +69,7 @@ message GetUserLikedReq {

// 获取用户点赞过对象响应
message GetUserLikedResp {
repeated Like likes = 1;
repeated action.Like likes = 1;
int64 total = 2;
}

Expand Down
4 changes: 2 additions & 2 deletions meowcloud/action/share.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ message GetSharedUsersReq {

// 获取分享对象列表响应
message GetSharedUsersResp {
repeated Share shares = 1;
repeated action.Share shares = 1;
int64 total = 2;
}

Expand All @@ -58,7 +58,7 @@ message GetUserSharedReq {

// 获取用户分享过对象响应
message GetUserSharedResp {
repeated Share shares = 1;
repeated action.Share shares = 1;
int64 total = 2;
}

Expand Down

0 comments on commit e4bfe6a

Please sign in to comment.