package model import ( "time" "go.mongodb.org/mongo-driver/bson/primitive" ) type AppModule struct { NodeID string `bson:"nodeId" json:"nodeId"` Name string `bson:"name" json:"name"` Intro string `bson:"intro" json:"intro"` Avatar string `bson:"avatar,omitempty" json:"avatar,omitempty"` FlowNodeType string `bson:"flowNodeType" json:"flowNodeType"` ShowStatus bool `bson:"showStatus,omitempty" json:"showStatus,omitempty"` Position Position `bson:"position" json:"position"` Version string `bson:"version" json:"version"` Inputs []AppInput `bson:"inputs" json:"inputs"` Outputs []AppOutput `bson:"outputs" json:"outputs"` } type Position struct { X float64 `bson:"x" json:"x"` Y float64 `bson:"y" json:"y"` } type AppInput struct { Key string `bson:"key" json:"key"` RenderTypeList []string `bson:"renderTypeList" json:"renderTypeList"` ValueType string `bson:"valueType" json:"valueType"` Label string `bson:"label" json:"label"` ToolDescription string `bson:"toolDescription,omitempty" json:"toolDescription,omitempty"` Required bool `bson:"required,omitempty" json:"required,omitempty"` Value interface{} `bson:"value,omitempty" json:"value,omitempty"` Min *int32 `bson:"min,omitempty" json:"min,omitempty"` Max *int32 `bson:"max,omitempty" json:"max,omitempty"` Step *int32 `bson:"step,omitempty" json:"step,omitempty"` Description string `bson:"description,omitempty" json:"description,omitempty"` DebugLabel string `bson:"debugLabel,omitempty" json:"debugLabel,omitempty"` Placeholder string `bson:"placeholder,omitempty" json:"placeholder,omitempty"` } type AppOutput struct { ID string `bson:"id" json:"id"` Key string `bson:"key" json:"key"` Label string `bson:"label" json:"label"` Required bool `bson:"required,omitempty" json:"required,omitempty"` Description string `bson:"description,omitempty" json:"description,omitempty"` ValueType string `bson:"valueType" json:"valueType"` ValueDesc string `bson:"valueDesc,omitempty" json:"valueDesc,omitempty"` Type string `bson:"type" json:"type"` } type Edge struct { Source string `bson:"source" json:"source"` Target string `bson:"target" json:"target"` SourceHandle string `bson:"sourceHandle" json:"sourceHandle"` TargetHandle string `bson:"targetHandle" json:"targetHandle"` } type PluginData struct { ID primitive.ObjectID `bson:"_id" json:"id"` NodeVersion string `bson:"nodeVersion" json:"nodeVersion"` } type TTSConfig struct { Type string `bson:"type" json:"type"` } type WhisperConfig struct { Open bool `bson:"open" json:"open"` AutoSend bool `bson:"autoSend" json:"autoSend"` AutoTTSResponse bool `bson:"autoTTSResponse" json:"autoTTSResponse"` } type ChatInputGuide struct { Open bool `bson:"open" json:"open"` TextList []string `bson:"textList" json:"textList"` CustomUrl string `bson:"customUrl" json:"customUrl"` } type ChatConfig struct { WelcomeText string `bson:"welcomeText" json:"welcomeText"` Variables []interface{} `bson:"variables" json:"variables"` QuestionGuide bool `bson:"questionGuide" json:"questionGuide"` TTSConfig TTSConfig `bson:"ttsConfig" json:"ttsConfig"` WhisperConfig WhisperConfig `bson:"whisperConfig" json:"whisperConfig"` ScheduledTriggerConfig interface{} `bson:"scheduledTriggerConfig" json:"scheduledTriggerConfig"` ChatInputGuide ChatInputGuide `bson:"chatInputGuide" json:"chatInputGuide"` Instruction string `bson:"instruction" json:"instruction"` ID primitive.ObjectID `bson:"_id" json:"id"` } type Apps struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` ParentID *primitive.ObjectID `bson:"parentId,omitempty" json:"parentId,omitempty"` TeamID primitive.ObjectID `bson:"teamId" json:"teamId"` TmbID primitive.ObjectID `bson:"tmbId" json:"tmbId"` Name string `bson:"name" json:"name"` Type string `bson:"type" json:"type"` Version string `bson:"version" json:"version"` Avatar string `bson:"avatar" json:"avatar"` Intro string `bson:"intro" json:"intro"` TeamTags []string `bson:"teamTags" json:"teamTags"` Modules []AppModule `bson:"modules" json:"modules"` Edges []Edge `bson:"edges" json:"edges"` PluginData PluginData `bson:"pluginData" json:"pluginData"` InheritPermission bool `bson:"inheritPermission" json:"inheritPermission"` UpdateTime time.Time `bson:"updateTime" json:"updateTime"` VersionNumber int32 `bson:"__v" json:"versionNumber"` ChatConfig ChatConfig `bson:"chatConfig" json:"chatConfig"` ScheduledTriggerConfig interface{} `bson:"scheduledTriggerConfig" json:"scheduledTriggerConfig"` ScheduledTriggerNextTime interface{} `bson:"scheduledTriggerNextTime" json:"scheduledTriggerNextTime"` }