-
Notifications
You must be signed in to change notification settings - Fork 15
/
favorite.proto
82 lines (68 loc) · 2.03 KB
/
favorite.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
syntax = "proto3";
package douyin.favorite;
option go_package = "douyin/favorite";
import "feed.proto";
message FavoriteRequest {
uint32 actor_id = 1; // 用户id
uint32 video_id = 2; // 视频id
uint32 action_type = 3; // 1-点赞,2-取消点赞
}
message FavoriteResponse {
uint32 status_code = 1; // 状态码,0-成功,其他值-失败
optional string status_msg = 2; // 返回状态描述
}
message FavoriteListRequest {
uint32 actor_id = 1; // 发出请求的用户的id
uint32 user_id = 2; // 用户id
}
message FavoriteListResponse {
uint32 status_code = 1; // 状态码,0-成功,其他值-失败
optional string status_msg = 2; // 返回状态描述
repeated feed.Video video_list = 3; // 用户点赞视频列表
}
message IsFavoriteRequest {
uint32 user_id = 1; // 用户id
uint32 video_id = 2; // 视频id
}
message IsFavoriteResponse {
bool result = 1; // 结果
}
message CountFavoriteRequest {
uint32 video_id = 1; // 视频id
}
message CountFavoriteResponse {
uint32 status_code = 1;
optional string status_msg = 2;
uint32 count = 3; // 点赞数
}
message CountUserFavoriteRequest {
uint32 user_id = 1; // 用户id
}
message CountUserFavoriteResponse {
uint32 status_code = 1;
optional string status_msg = 2;
uint32 count = 3; // 点赞数
}
message CountUserTotalFavoritedRequest {
uint32 actor_id = 1;
uint32 user_id = 2;
}
message CountUserTotalFavoritedResponse {
uint32 status_code = 1;
optional string status_msg = 2;
uint32 count = 3; // 点赞数
}
service FavoriteService {
rpc FavoriteAction (FavoriteRequest) returns (FavoriteResponse){
}
rpc FavoriteList (FavoriteListRequest) returns (FavoriteListResponse) {
}
rpc IsFavorite (IsFavoriteRequest) returns (IsFavoriteResponse) {
}
rpc CountFavorite (CountFavoriteRequest) returns (CountFavoriteResponse) {
}
rpc CountUserFavorite (CountUserFavoriteRequest) returns (CountUserFavoriteResponse) {
}
rpc CountUserTotalFavorited (CountUserTotalFavoritedRequest) returns (CountUserTotalFavoritedResponse) {
}
}