847 lines
24 KiB
Go
847 lines
24 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v6.30.1
|
|
// source: blocks.proto
|
|
|
|
package survey
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// 问题类型
|
|
type QuestionType int32
|
|
|
|
const (
|
|
QuestionType_SINGLE_CHOICE QuestionType = 0 // 单选题
|
|
QuestionType_MULTIPLE_CHOICE QuestionType = 1 // 多选题
|
|
QuestionType_TEXT QuestionType = 2 // 文本题
|
|
QuestionType_SCALE QuestionType = 3 // 量表题
|
|
QuestionType_RANKING QuestionType = 4 // 排序题
|
|
QuestionType_DATE QuestionType = 5 // 日期题
|
|
)
|
|
|
|
// Enum value maps for QuestionType.
|
|
var (
|
|
QuestionType_name = map[int32]string{
|
|
0: "SINGLE_CHOICE",
|
|
1: "MULTIPLE_CHOICE",
|
|
2: "TEXT",
|
|
3: "SCALE",
|
|
4: "RANKING",
|
|
5: "DATE",
|
|
}
|
|
QuestionType_value = map[string]int32{
|
|
"SINGLE_CHOICE": 0,
|
|
"MULTIPLE_CHOICE": 1,
|
|
"TEXT": 2,
|
|
"SCALE": 3,
|
|
"RANKING": 4,
|
|
"DATE": 5,
|
|
}
|
|
)
|
|
|
|
func (x QuestionType) Enum() *QuestionType {
|
|
p := new(QuestionType)
|
|
*p = x
|
|
return p
|
|
}
|
|
|
|
func (x QuestionType) String() string {
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
}
|
|
|
|
func (QuestionType) Descriptor() protoreflect.EnumDescriptor {
|
|
return file_blocks_proto_enumTypes[0].Descriptor()
|
|
}
|
|
|
|
func (QuestionType) Type() protoreflect.EnumType {
|
|
return &file_blocks_proto_enumTypes[0]
|
|
}
|
|
|
|
func (x QuestionType) Number() protoreflect.EnumNumber {
|
|
return protoreflect.EnumNumber(x)
|
|
}
|
|
|
|
// Deprecated: Use QuestionType.Descriptor instead.
|
|
func (QuestionType) EnumDescriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
type Empty struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Empty) Reset() {
|
|
*x = Empty{}
|
|
mi := &file_blocks_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Empty) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Empty) ProtoMessage() {}
|
|
|
|
func (x *Empty) ProtoReflect() protoreflect.Message {
|
|
mi := &file_blocks_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Empty.ProtoReflect.Descriptor instead.
|
|
func (*Empty) Descriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
type FetchRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` // 页数
|
|
PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页记录数
|
|
Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *FetchRequest) Reset() {
|
|
*x = FetchRequest{}
|
|
mi := &file_blocks_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *FetchRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*FetchRequest) ProtoMessage() {}
|
|
|
|
func (x *FetchRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_blocks_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead.
|
|
func (*FetchRequest) Descriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *FetchRequest) GetPageNo() int64 {
|
|
if x != nil {
|
|
return x.PageNo
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *FetchRequest) GetPageSize() int64 {
|
|
if x != nil {
|
|
return x.PageSize
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *FetchRequest) GetParams() map[string]string {
|
|
if x != nil {
|
|
return x.Params
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type IdentRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID
|
|
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *IdentRequest) Reset() {
|
|
*x = IdentRequest{}
|
|
mi := &file_blocks_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *IdentRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*IdentRequest) ProtoMessage() {}
|
|
|
|
func (x *IdentRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_blocks_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead.
|
|
func (*IdentRequest) Descriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *IdentRequest) GetId() int64 {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *IdentRequest) GetIdentity() string {
|
|
if x != nil {
|
|
return x.Identity
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type VersionRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *VersionRequest) Reset() {
|
|
*x = VersionRequest{}
|
|
mi := &file_blocks_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *VersionRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*VersionRequest) ProtoMessage() {}
|
|
|
|
func (x *VersionRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_blocks_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead.
|
|
func (*VersionRequest) Descriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *VersionRequest) GetVersion() int64 {
|
|
if x != nil {
|
|
return x.Version
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type SearchRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SearchRequest) Reset() {
|
|
*x = SearchRequest{}
|
|
mi := &file_blocks_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SearchRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SearchRequest) ProtoMessage() {}
|
|
|
|
func (x *SearchRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_blocks_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
|
|
func (*SearchRequest) Descriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *SearchRequest) GetKeyword() string {
|
|
if x != nil {
|
|
return x.Keyword
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type StatusReply struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Status int64 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` // 状态码
|
|
Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 标识码
|
|
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` //状态说明
|
|
Timeseq int64 `protobuf:"varint,4,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *StatusReply) Reset() {
|
|
*x = StatusReply{}
|
|
mi := &file_blocks_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *StatusReply) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StatusReply) ProtoMessage() {}
|
|
|
|
func (x *StatusReply) ProtoReflect() protoreflect.Message {
|
|
mi := &file_blocks_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.
|
|
func (*StatusReply) Descriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *StatusReply) GetStatus() int64 {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *StatusReply) GetIdentity() string {
|
|
if x != nil {
|
|
return x.Identity
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *StatusReply) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *StatusReply) GetTimeseq() int64 {
|
|
if x != nil {
|
|
return x.Timeseq
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// 问卷基本信息
|
|
type SurveyItem struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 问卷ID
|
|
Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` // 问卷标题
|
|
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // 问卷描述
|
|
CreatorId string `protobuf:"bytes,4,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` // 创建者ID
|
|
StartTime string `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // 开始时间
|
|
EndTime string `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // 结束时间
|
|
IsActive bool `protobuf:"varint,7,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // 是否激活
|
|
IsAnonymous bool `protobuf:"varint,8,opt,name=is_anonymous,json=isAnonymous,proto3" json:"is_anonymous,omitempty"` // 是否匿名
|
|
Questions []*QuestionItem `protobuf:"bytes,9,rep,name=questions,proto3" json:"questions,omitempty"` // 问题列表
|
|
Tags []string `protobuf:"bytes,10,rep,name=tags,proto3" json:"tags,omitempty"` // 标签
|
|
StyleConfig string `protobuf:"bytes,11,opt,name=style_config,json=styleConfig,proto3" json:"style_config,omitempty"` // 样式配置(JSON)
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SurveyItem) Reset() {
|
|
*x = SurveyItem{}
|
|
mi := &file_blocks_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SurveyItem) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SurveyItem) ProtoMessage() {}
|
|
|
|
func (x *SurveyItem) ProtoReflect() protoreflect.Message {
|
|
mi := &file_blocks_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use SurveyItem.ProtoReflect.Descriptor instead.
|
|
func (*SurveyItem) Descriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *SurveyItem) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SurveyItem) GetTitle() string {
|
|
if x != nil {
|
|
return x.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SurveyItem) GetDescription() string {
|
|
if x != nil {
|
|
return x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SurveyItem) GetCreatorId() string {
|
|
if x != nil {
|
|
return x.CreatorId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SurveyItem) GetStartTime() string {
|
|
if x != nil {
|
|
return x.StartTime
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SurveyItem) GetEndTime() string {
|
|
if x != nil {
|
|
return x.EndTime
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SurveyItem) GetIsActive() bool {
|
|
if x != nil {
|
|
return x.IsActive
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *SurveyItem) GetIsAnonymous() bool {
|
|
if x != nil {
|
|
return x.IsAnonymous
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *SurveyItem) GetQuestions() []*QuestionItem {
|
|
if x != nil {
|
|
return x.Questions
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *SurveyItem) GetTags() []string {
|
|
if x != nil {
|
|
return x.Tags
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *SurveyItem) GetStyleConfig() string {
|
|
if x != nil {
|
|
return x.StyleConfig
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 问题定义
|
|
type QuestionItem struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 问题ID
|
|
SurveyId string `protobuf:"bytes,2,opt,name=survey_id,json=surveyId,proto3" json:"survey_id,omitempty"` // 所属问卷ID
|
|
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"` // 问题标题
|
|
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // 问题描述
|
|
Type QuestionType `protobuf:"varint,5,opt,name=type,proto3,enum=survey.QuestionType" json:"type,omitempty"` // 问题类型
|
|
IsRequired bool `protobuf:"varint,6,opt,name=is_required,json=isRequired,proto3" json:"is_required,omitempty"` // 是否必答
|
|
Options []*Option `protobuf:"bytes,7,rep,name=options,proto3" json:"options,omitempty"` // 选项(适用于选择题)
|
|
MinSelections int32 `protobuf:"varint,8,opt,name=min_selections,json=minSelections,proto3" json:"min_selections,omitempty"` // 最少选择数(多选题)
|
|
MaxSelections int32 `protobuf:"varint,9,opt,name=max_selections,json=maxSelections,proto3" json:"max_selections,omitempty"` // 最多选择数(多选题)
|
|
Order int32 `protobuf:"varint,10,opt,name=order,proto3" json:"order,omitempty"` // 问题顺序
|
|
Placeholder string `protobuf:"bytes,11,opt,name=placeholder,proto3" json:"placeholder,omitempty"` // 输入提示(文本题)
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *QuestionItem) Reset() {
|
|
*x = QuestionItem{}
|
|
mi := &file_blocks_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *QuestionItem) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*QuestionItem) ProtoMessage() {}
|
|
|
|
func (x *QuestionItem) ProtoReflect() protoreflect.Message {
|
|
mi := &file_blocks_proto_msgTypes[7]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use QuestionItem.ProtoReflect.Descriptor instead.
|
|
func (*QuestionItem) Descriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *QuestionItem) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *QuestionItem) GetSurveyId() string {
|
|
if x != nil {
|
|
return x.SurveyId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *QuestionItem) GetTitle() string {
|
|
if x != nil {
|
|
return x.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *QuestionItem) GetDescription() string {
|
|
if x != nil {
|
|
return x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *QuestionItem) GetType() QuestionType {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return QuestionType_SINGLE_CHOICE
|
|
}
|
|
|
|
func (x *QuestionItem) GetIsRequired() bool {
|
|
if x != nil {
|
|
return x.IsRequired
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *QuestionItem) GetOptions() []*Option {
|
|
if x != nil {
|
|
return x.Options
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *QuestionItem) GetMinSelections() int32 {
|
|
if x != nil {
|
|
return x.MinSelections
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *QuestionItem) GetMaxSelections() int32 {
|
|
if x != nil {
|
|
return x.MaxSelections
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *QuestionItem) GetOrder() int32 {
|
|
if x != nil {
|
|
return x.Order
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *QuestionItem) GetPlaceholder() string {
|
|
if x != nil {
|
|
return x.Placeholder
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 问题选项
|
|
type Option struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 选项ID
|
|
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` // 选项文本
|
|
Order int32 `protobuf:"varint,3,opt,name=order,proto3" json:"order,omitempty"` // 选项顺序
|
|
ImageUrl string `protobuf:"bytes,4,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` // 选项图片
|
|
Score int32 `protobuf:"varint,5,opt,name=score,proto3" json:"score,omitempty"` // 选项分数(适用于量表)
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Option) Reset() {
|
|
*x = Option{}
|
|
mi := &file_blocks_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Option) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Option) ProtoMessage() {}
|
|
|
|
func (x *Option) ProtoReflect() protoreflect.Message {
|
|
mi := &file_blocks_proto_msgTypes[8]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use Option.ProtoReflect.Descriptor instead.
|
|
func (*Option) Descriptor() ([]byte, []int) {
|
|
return file_blocks_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
func (x *Option) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Option) GetText() string {
|
|
if x != nil {
|
|
return x.Text
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Option) GetOrder() int32 {
|
|
if x != nil {
|
|
return x.Order
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Option) GetImageUrl() string {
|
|
if x != nil {
|
|
return x.ImageUrl
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Option) GetScore() int32 {
|
|
if x != nil {
|
|
return x.Score
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_blocks_proto protoreflect.FileDescriptor
|
|
|
|
const file_blocks_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\fblocks.proto\x12\x06survey\"\a\n" +
|
|
"\x05Empty\"\xb9\x01\n" +
|
|
"\fFetchRequest\x12\x17\n" +
|
|
"\apage_no\x18\x01 \x01(\x03R\x06pageNo\x12\x1b\n" +
|
|
"\tpage_size\x18\x02 \x01(\x03R\bpageSize\x128\n" +
|
|
"\x06params\x18\x03 \x03(\v2 .survey.FetchRequest.ParamsEntryR\x06params\x1a9\n" +
|
|
"\vParamsEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
|
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" +
|
|
"\fIdentRequest\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" +
|
|
"\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" +
|
|
"\x0eVersionRequest\x12\x18\n" +
|
|
"\aversion\x18\x01 \x01(\x03R\aversion\")\n" +
|
|
"\rSearchRequest\x12\x18\n" +
|
|
"\akeyword\x18\x01 \x01(\tR\akeyword\"u\n" +
|
|
"\vStatusReply\x12\x16\n" +
|
|
"\x06status\x18\x01 \x01(\x03R\x06status\x12\x1a\n" +
|
|
"\bidentity\x18\x02 \x01(\tR\bidentity\x12\x18\n" +
|
|
"\amessage\x18\x03 \x01(\tR\amessage\x12\x18\n" +
|
|
"\atimeseq\x18\x04 \x01(\x03R\atimeseq\"\xd8\x02\n" +
|
|
"\n" +
|
|
"SurveyItem\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x14\n" +
|
|
"\x05title\x18\x02 \x01(\tR\x05title\x12 \n" +
|
|
"\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1d\n" +
|
|
"\n" +
|
|
"creator_id\x18\x04 \x01(\tR\tcreatorId\x12\x1d\n" +
|
|
"\n" +
|
|
"start_time\x18\x05 \x01(\tR\tstartTime\x12\x19\n" +
|
|
"\bend_time\x18\x06 \x01(\tR\aendTime\x12\x1b\n" +
|
|
"\tis_active\x18\a \x01(\bR\bisActive\x12!\n" +
|
|
"\fis_anonymous\x18\b \x01(\bR\visAnonymous\x122\n" +
|
|
"\tquestions\x18\t \x03(\v2\x14.survey.QuestionItemR\tquestions\x12\x12\n" +
|
|
"\x04tags\x18\n" +
|
|
" \x03(\tR\x04tags\x12!\n" +
|
|
"\fstyle_config\x18\v \x01(\tR\vstyleConfig\"\xee\x02\n" +
|
|
"\fQuestionItem\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n" +
|
|
"\tsurvey_id\x18\x02 \x01(\tR\bsurveyId\x12\x14\n" +
|
|
"\x05title\x18\x03 \x01(\tR\x05title\x12 \n" +
|
|
"\vdescription\x18\x04 \x01(\tR\vdescription\x12(\n" +
|
|
"\x04type\x18\x05 \x01(\x0e2\x14.survey.QuestionTypeR\x04type\x12\x1f\n" +
|
|
"\vis_required\x18\x06 \x01(\bR\n" +
|
|
"isRequired\x12(\n" +
|
|
"\aoptions\x18\a \x03(\v2\x0e.survey.OptionR\aoptions\x12%\n" +
|
|
"\x0emin_selections\x18\b \x01(\x05R\rminSelections\x12%\n" +
|
|
"\x0emax_selections\x18\t \x01(\x05R\rmaxSelections\x12\x14\n" +
|
|
"\x05order\x18\n" +
|
|
" \x01(\x05R\x05order\x12 \n" +
|
|
"\vplaceholder\x18\v \x01(\tR\vplaceholder\"u\n" +
|
|
"\x06Option\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
|
"\x04text\x18\x02 \x01(\tR\x04text\x12\x14\n" +
|
|
"\x05order\x18\x03 \x01(\x05R\x05order\x12\x1b\n" +
|
|
"\timage_url\x18\x04 \x01(\tR\bimageUrl\x12\x14\n" +
|
|
"\x05score\x18\x05 \x01(\x05R\x05score*b\n" +
|
|
"\fQuestionType\x12\x11\n" +
|
|
"\rSINGLE_CHOICE\x10\x00\x12\x13\n" +
|
|
"\x0fMULTIPLE_CHOICE\x10\x01\x12\b\n" +
|
|
"\x04TEXT\x10\x02\x12\t\n" +
|
|
"\x05SCALE\x10\x03\x12\v\n" +
|
|
"\aRANKING\x10\x04\x12\b\n" +
|
|
"\x04DATE\x10\x05B\n" +
|
|
"Z\b.;surveyb\x06proto3"
|
|
|
|
var (
|
|
file_blocks_proto_rawDescOnce sync.Once
|
|
file_blocks_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_blocks_proto_rawDescGZIP() []byte {
|
|
file_blocks_proto_rawDescOnce.Do(func() {
|
|
file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)))
|
|
})
|
|
return file_blocks_proto_rawDescData
|
|
}
|
|
|
|
var file_blocks_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
|
var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
|
|
var file_blocks_proto_goTypes = []any{
|
|
(QuestionType)(0), // 0: survey.QuestionType
|
|
(*Empty)(nil), // 1: survey.Empty
|
|
(*FetchRequest)(nil), // 2: survey.FetchRequest
|
|
(*IdentRequest)(nil), // 3: survey.IdentRequest
|
|
(*VersionRequest)(nil), // 4: survey.VersionRequest
|
|
(*SearchRequest)(nil), // 5: survey.SearchRequest
|
|
(*StatusReply)(nil), // 6: survey.StatusReply
|
|
(*SurveyItem)(nil), // 7: survey.SurveyItem
|
|
(*QuestionItem)(nil), // 8: survey.QuestionItem
|
|
(*Option)(nil), // 9: survey.Option
|
|
nil, // 10: survey.FetchRequest.ParamsEntry
|
|
}
|
|
var file_blocks_proto_depIdxs = []int32{
|
|
10, // 0: survey.FetchRequest.params:type_name -> survey.FetchRequest.ParamsEntry
|
|
8, // 1: survey.SurveyItem.questions:type_name -> survey.QuestionItem
|
|
0, // 2: survey.QuestionItem.type:type_name -> survey.QuestionType
|
|
9, // 3: survey.QuestionItem.options:type_name -> survey.Option
|
|
4, // [4:4] is the sub-list for method output_type
|
|
4, // [4:4] is the sub-list for method input_type
|
|
4, // [4:4] is the sub-list for extension type_name
|
|
4, // [4:4] is the sub-list for extension extendee
|
|
0, // [0:4] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_blocks_proto_init() }
|
|
func file_blocks_proto_init() {
|
|
if File_blocks_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)),
|
|
NumEnums: 1,
|
|
NumMessages: 10,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_blocks_proto_goTypes,
|
|
DependencyIndexes: file_blocks_proto_depIdxs,
|
|
EnumInfos: file_blocks_proto_enumTypes,
|
|
MessageInfos: file_blocks_proto_msgTypes,
|
|
}.Build()
|
|
File_blocks_proto = out.File
|
|
file_blocks_proto_goTypes = nil
|
|
file_blocks_proto_depIdxs = nil
|
|
}
|