Skip to content

Commit

Permalink
feat: 完善了校友会小程序的idl,补充了一些接口
Browse files Browse the repository at this point in the history
  • Loading branch information
universero committed Nov 28, 2024
1 parent 7c4c97d commit 21b22db
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
25 changes: 25 additions & 0 deletions alumni/core_api/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ message GetActivityReq {

message GetActivityResp {
Activity activity = 1;
int64 numbers = 2;
}

// 报名活动
Expand All @@ -153,6 +154,19 @@ message RegisterActivityReq {
message CheckInReq {
string activityId = 1;
string phone = 2;
string name = 3;
}

// 获取活动签到情况
message GetRegistersReq {
string activityId = 1;
}

// 获取活动详情响应
message GetRegisterResp {
int64 total = 1;
int64 checked = 2;
repeated Register registers = 3;
}

// 教育经历
Expand Down Expand Up @@ -188,6 +202,17 @@ message Activity {
int64 status = 13;
}

// 报名情况
message Register {
string id = 1;
string activityId = 2;
string name = 3;
string phone = 4;
bool checkIn = 5;
int64 createTime = 6;
int64 updateTime = 7;
}

// 通用响应
message Response {
int64 code = 1;
Expand Down
4 changes: 4 additions & 0 deletions alumni/core_api/core_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,8 @@ service core_api {
rpc CheckIn(CheckInReq) returns (Response) {
option(http.post) = "/activity/check_in";
}
// 获取报名签到详情
rpc GetRegisters(GetRegistersReq) returns (GetRegisterResp) {
option(http.post) = "/activity/get_register";
}
}
14 changes: 8 additions & 6 deletions essay/show/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ message GetUserInfoResp {
Payload payload = 3;
}

// 更新用户信息
message UpdateUserInfoReq {
string username = 1;
}

/*
* 作文批改相关
Expand Down Expand Up @@ -98,9 +102,7 @@ message Log {
int64 createTime = 5;
}

// 响应
//message Response {
// bool done = 1;
// string msg = 2;
//}
//
message Response {
int64 code = 1;
string msg = 2;
}
4 changes: 4 additions & 0 deletions essay/show/show.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ service show {
rpc GetUserInfo(GetUserInfoReq) returns (GetUserInfoResp) {
option (http.get) = "/user/info";
}
// 更新用户信息
rpc UpdateUserInfo(UpdateUserInfoReq) returns (Response) {
option (http.post) = "/user/update";
}
// 文本作文批改
rpc EssayEvaluate(EssayEvaluateReq) returns (EssayEvaluateResp) {
option (http.post) = "/essay/evaluate";
Expand Down

0 comments on commit 21b22db

Please sign in to comment.