protoc-gen-slc/proto/share.proto

27 lines
804 B
Protocol Buffer

syntax = "proto3";
package survey;
option go_package = ".;survey";
import "blocks.proto";
// 问卷服务 - 分享管理
service Share {
rpc Create (IdentRequest) returns (StatusReply);
rpc Fetch (FetchRequest) returns (ListShareReply);
rpc SetStatus (StatusReply) returns (StatusReply);
}
message ListShareReply {
repeated ShareItem data = 1;
int64 count = 2;
}
// 分享链接
message ShareItem {
string id = 1; // 分享ID
string survey_id = 2; // 问卷ID
string url = 3; // 分享URL
string creator_id = 4; // 创建者ID
int64 expires_at = 6; // 过期时间
int32 max_responses = 7; // 最大回答数(0表示不限)
bool is_active = 8; // 是否激活
}