This commit is contained in:
2025-04-01 17:37:16 +08:00
parent d94b2744c0
commit 23c5220745
35 changed files with 2938 additions and 3585 deletions

28
proto/answer.proto Normal file
View File

@@ -0,0 +1,28 @@
syntax = "proto3";
package survey;
option go_package = ".;survey";
import "blocks.proto";
// 问卷服务 - 答卷管理
service Answer {
rpc Submit (SubmitAnswerRequest) returns (StatusReply);
rpc BySurvey (IdentRequest) returns (ListAnswerReply);
}
message SubmitAnswerRequest {
string survey_id = 1;
string owner_id = 2; // 答题者ID
repeated AnswerItem answer = 3; // 答题
string ip_address = 4;
string user_agent = 5;
}
message AnswerItem {
string question_id = 1;
repeated string answer = 2;
}
message ListAnswerReply {
repeated AnswerItem data = 1;
int64 count = 2;
}