ok
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
syntax = "proto3";
|
||||
package content;
|
||||
option go_package = "./;content";
|
||||
package survey;
|
||||
option go_package = ".;survey";
|
||||
|
||||
|
||||
message Empty{
|
||||
}
|
||||
|
||||
message FetchRequest {
|
||||
int64 page_no=1; // 页数
|
||||
@@ -30,5 +34,52 @@ message StatusReply{
|
||||
int64 timeseq=4; // 响应时间序列
|
||||
}
|
||||
|
||||
message Empty{
|
||||
|
||||
// 问卷基本信息
|
||||
message SurveyItem {
|
||||
string id = 1; // 问卷ID
|
||||
string title = 2; // 问卷标题
|
||||
string description = 3; // 问卷描述
|
||||
string creator_id = 4; // 创建者ID
|
||||
string start_time = 5; // 开始时间
|
||||
string end_time = 6; // 结束时间
|
||||
bool is_active = 7; // 是否激活
|
||||
bool is_anonymous = 8; // 是否匿名
|
||||
repeated QuestionItem questions = 9; // 问题列表
|
||||
repeated string tags = 10; // 标签
|
||||
string style_config = 11; // 样式配置(JSON)
|
||||
}
|
||||
|
||||
// 问题类型
|
||||
enum QuestionType {
|
||||
SINGLE_CHOICE = 0; // 单选题
|
||||
MULTIPLE_CHOICE = 1; // 多选题
|
||||
TEXT = 2; // 文本题
|
||||
SCALE = 3; // 量表题
|
||||
RANKING = 4; // 排序题
|
||||
DATE = 5; // 日期题
|
||||
}
|
||||
|
||||
// 问题定义
|
||||
message QuestionItem {
|
||||
string id = 1; // 问题ID
|
||||
string survey_id = 2; // 所属问卷ID
|
||||
string title = 3; // 问题标题
|
||||
string description = 4; // 问题描述
|
||||
QuestionType type = 5; // 问题类型
|
||||
bool is_required = 6; // 是否必答
|
||||
repeated Option options = 7; // 选项(适用于选择题)
|
||||
int32 min_selections = 8; // 最少选择数(多选题)
|
||||
int32 max_selections = 9; // 最多选择数(多选题)
|
||||
int32 order = 10; // 问题顺序
|
||||
string placeholder = 11; // 输入提示(文本题)
|
||||
}
|
||||
|
||||
// 问题选项
|
||||
message Option {
|
||||
string id = 1; // 选项ID
|
||||
string text = 2; // 选项文本
|
||||
int32 order = 3; // 选项顺序
|
||||
string image_url = 4; // 选项图片
|
||||
int32 score = 5; // 选项分数(适用于量表)
|
||||
}
|
||||
Reference in New Issue
Block a user