chore: replace all cn comments to en version by volc api (#313)
This commit is contained in:
@@ -67,9 +67,9 @@ type CreateDocumentResponse struct {
|
||||
type SearchType string
|
||||
|
||||
const (
|
||||
SearchTypeSemantic SearchType = "semantic" // 语义
|
||||
SearchTypeFullText SearchType = "full_text" // 全文
|
||||
SearchTypeHybrid SearchType = "hybrid" // 混合
|
||||
SearchTypeSemantic SearchType = "semantic" // semantics
|
||||
SearchTypeFullText SearchType = "full_text" // full text
|
||||
SearchTypeHybrid SearchType = "hybrid" // mix
|
||||
)
|
||||
|
||||
type RetrievalStrategy struct {
|
||||
|
||||
@@ -561,7 +561,7 @@ var NodeTypeMetas = []*NodeTypeMeta{
|
||||
},
|
||||
{
|
||||
ID: 43,
|
||||
Name: "查询数据", // Corrected Name from JSON (was "插入数据")
|
||||
Name: "查询数据", // Corrected Name from JSON (was "insert data")
|
||||
Type: NodeTypeDatabaseQuery,
|
||||
Category: "database", // Mapped from cate_list
|
||||
Desc: "从表获取数据,用户可定义查询条件、选择列等,输出符合条件的数据", // Corrected Desc from JSON
|
||||
@@ -616,7 +616,7 @@ var NodeTypeMetas = []*NodeTypeMeta{
|
||||
},
|
||||
{
|
||||
ID: 46,
|
||||
Name: "新增数据", // Corrected Name from JSON (was "查询数据")
|
||||
Name: "新增数据", // Corrected Name from JSON (was "Query Data")
|
||||
Type: NodeTypeDatabaseInsert,
|
||||
Category: "database", // Mapped from cate_list
|
||||
Desc: "向表添加新数据记录,用户输入数据内容后插入数据库", // Corrected Desc from JSON
|
||||
|
||||
@@ -520,7 +520,7 @@ const (
|
||||
type RefSourceType string
|
||||
|
||||
const (
|
||||
RefSourceTypeBlockOutput RefSourceType = "block-output" // 代表引用了某个 Block 的输出隐式声明的变量
|
||||
RefSourceTypeBlockOutput RefSourceType = "block-output" // Represents an implicitly declared variable that references the output of a block
|
||||
RefSourceTypeGlobalApp RefSourceType = "global_variable_app"
|
||||
RefSourceTypeGlobalSystem RefSourceType = "global_variable_system"
|
||||
RefSourceTypeGlobalUser RefSourceType = "global_variable_user"
|
||||
|
||||
@@ -45,23 +45,23 @@ func TestTypeInfoToJSONSchema(t *testing.T) {
|
||||
|
||||
props := schemaObj["properties"].(map[string]any)
|
||||
|
||||
// 验证字符串字段
|
||||
// Validate string field
|
||||
stringProp := props["stringField"].(map[string]any)
|
||||
assert.Equal(t, "string", stringProp["type"])
|
||||
|
||||
// 验证整数字段
|
||||
// Validate integer fields
|
||||
intProp := props["intField"].(map[string]any)
|
||||
assert.Equal(t, "integer", intProp["type"])
|
||||
|
||||
// 验证数字字段
|
||||
// Validate numeric field
|
||||
numProp := props["numField"].(map[string]any)
|
||||
assert.Equal(t, "number", numProp["type"])
|
||||
|
||||
// 验证布尔字段
|
||||
// Validate Boolean fields
|
||||
boolProp := props["boolField"].(map[string]any)
|
||||
assert.Equal(t, "boolean", boolProp["type"])
|
||||
|
||||
// 验证时间字段
|
||||
// validation time field
|
||||
timeProp := props["timeField"].(map[string]any)
|
||||
assert.Equal(t, "string", timeProp["type"])
|
||||
assert.Equal(t, "date-time", timeProp["format"])
|
||||
@@ -87,17 +87,17 @@ func TestTypeInfoToJSONSchema(t *testing.T) {
|
||||
|
||||
props := schemaObj["properties"].(map[string]any)
|
||||
|
||||
// 验证对象字段
|
||||
// Validation Object Field
|
||||
objProp := props["objectField"].(map[string]any)
|
||||
assert.Equal(t, "object", objProp["type"])
|
||||
|
||||
// 验证数组字段
|
||||
// Validate array fields
|
||||
arrProp := props["arrayField"].(map[string]any)
|
||||
assert.Equal(t, "array", arrProp["type"])
|
||||
items := arrProp["items"].(map[string]any)
|
||||
assert.Equal(t, "string", items["type"])
|
||||
|
||||
// 验证文件字段
|
||||
// Validate file field
|
||||
fileProp := props["fileField"].(map[string]any)
|
||||
assert.Equal(t, "string", fileProp["type"])
|
||||
assert.Equal(t, "image", fileProp["contentMediaType"])
|
||||
@@ -118,7 +118,7 @@ func TestTypeInfoToJSONSchema(t *testing.T) {
|
||||
|
||||
props := schemaObj["properties"].(map[string]any)
|
||||
|
||||
// 验证嵌套数组字段
|
||||
// Validate nested array fields
|
||||
arrProp := props["nestedArray"].(map[string]any)
|
||||
assert.Equal(t, "array", arrProp["type"])
|
||||
items := arrProp["items"].(map[string]any)
|
||||
@@ -136,12 +136,12 @@ func TestTypeInfoToJSONSchema(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// 辅助函数,用于创建 DataType 指针
|
||||
// Helper functions for creating DataType pointers
|
||||
func stringPtr(dt DataType) *DataType {
|
||||
return &dt
|
||||
}
|
||||
|
||||
// 辅助函数,用于创建 FileSubType 指针
|
||||
// Helper function for creating a FileSubType pointer
|
||||
func fileSubTypePtr(fst FileSubType) *FileSubType {
|
||||
return &fst
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ func TestDatabaseCURD(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestHttpRequester(t *testing.T) {
|
||||
listener, err := net.Listen("tcp", "127.0.0.1:8080") // 指定IP和端口
|
||||
listener, err := net.Listen("tcp", "127.0.0.1:8080") // Specify IP and port
|
||||
assert.NoError(t, err)
|
||||
ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path != "/http_error" {
|
||||
|
||||
@@ -527,7 +527,7 @@ func validateConnections(ctx context.Context, c *vo.Canvas) (issues []*Issue, er
|
||||
outDegree[edge.SourceNodeID]++
|
||||
}
|
||||
|
||||
portOutDegree := make(map[string]map[string]int) // 节点ID -> 端口 -> 出度
|
||||
portOutDegree := make(map[string]map[string]int) // Node ID - > Port - > Outgoing
|
||||
for _, edge := range c.Edges {
|
||||
|
||||
if _, ok := selectorPorts[edge.SourceNodeID]; !ok {
|
||||
@@ -573,7 +573,7 @@ func validateConnections(ctx context.Context, c *vo.Canvas) (issues []*Issue, er
|
||||
issues = append(issues, selectorIssues)
|
||||
}
|
||||
} else {
|
||||
// break, continue 不检查出度
|
||||
// Break, continue without checking out degrees
|
||||
if node.Type == vo.BlockTypeBotBreak || node.Type == vo.BlockTypeBotContinue {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ func TestInvoke(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
// 创建 HTTPRequest 实例
|
||||
// Create an HTTPRequest instance
|
||||
hg, err := NewHTTPRequester(context.Background(), cfg)
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -302,7 +302,7 @@ func TestInvoke(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
// 创建 HTTPRequest 实例
|
||||
// Create an HTTPRequest instance
|
||||
hg, err := NewHTTPRequester(context.Background(), cfg)
|
||||
assert.NoError(t, err)
|
||||
|
||||
@@ -375,7 +375,7 @@ func TestInvoke(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
// 创建 HTTPRequest 实例
|
||||
// Create an HTTPRequest instance
|
||||
hg, err := NewHTTPRequester(context.Background(), cfg)
|
||||
assert.NoError(t, err)
|
||||
|
||||
|
||||
@@ -101,8 +101,8 @@ const (
|
||||
- 输出按照下面结构体格式返回,包含提取到的字段或者追问的问题
|
||||
- 不要回复和提取无关的问题
|
||||
type Output struct {
|
||||
fields FieldInfo // 根据字段说明已经提取到的字段
|
||||
question string // 新一轮追问的问题
|
||||
fields FieldInfo // According to the field description, the fields that have been extracted
|
||||
question string // Follow-up question for the next round
|
||||
}`
|
||||
extractUserPromptSuffix = `
|
||||
- 严格以 json 格式返回答案。
|
||||
|
||||
@@ -87,7 +87,7 @@ func (t *TextProcessor) Invoke(ctx context.Context, input map[string]any) (map[s
|
||||
return nil, fmt.Errorf("input string field must string type but got %T", valueString)
|
||||
}
|
||||
values := strings.Split(valueString, t.config.Separators[0])
|
||||
// 对每个分隔符进行迭代处理
|
||||
// Iterate over each delimiter
|
||||
for _, sep := range t.config.Separators[1:] {
|
||||
var tempParts []string
|
||||
for _, part := range values {
|
||||
|
||||
@@ -6,7 +6,7 @@ package model
|
||||
|
||||
const TableNameNodeExecution = "node_execution"
|
||||
|
||||
// NodeExecution node 节点运行记录,用于记录每次workflow执行时,每个节点的状态信息
|
||||
// NodeExecution Node run record, used to record the status information of each node during each workflow execution
|
||||
type NodeExecution struct {
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:node execution id" json:"id"` // node execution id
|
||||
ExecuteID int64 `gorm:"column:execute_id;not null;comment:the workflow execute id this node execution belongs to" json:"execute_id"` // the workflow execute id this node execution belongs to
|
||||
|
||||
@@ -10,17 +10,17 @@ import (
|
||||
|
||||
const TableNameWorkflowDraft = "workflow_draft"
|
||||
|
||||
// WorkflowDraft workflow 画布草稿表,用于记录workflow最新的草稿画布信息
|
||||
// WorkflowDraft Workflow canvas draft table, used to record the latest draft canvas information of workflow
|
||||
type WorkflowDraft struct {
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:workflow ID" json:"id"` // workflow ID
|
||||
Canvas string `gorm:"column:canvas;not null;comment:前端 schema" json:"canvas"` // 前端 schema
|
||||
InputParams string `gorm:"column:input_params;comment: 入参 schema" json:"input_params"` // 入参 schema
|
||||
OutputParams string `gorm:"column:output_params;comment: 出参 schema" json:"output_params"` // 出参 schema
|
||||
TestRunSuccess bool `gorm:"column:test_run_success;not null;comment:0 未运行, 1 运行成功" json:"test_run_success"` // 0 未运行, 1 运行成功
|
||||
Modified bool `gorm:"column:modified;not null;comment:0 未被修改, 1 已被修改" json:"modified"` // 0 未被修改, 1 已被修改
|
||||
UpdatedAt int64 `gorm:"column:updated_at;autoUpdateTime:milli" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
|
||||
CommitID string `gorm:"column:commit_id;not null;comment:used to uniquely identify a draft snapshot" json:"commit_id"` // used to uniquely identify a draft snapshot
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:workflow ID" json:"id"` // workflow ID
|
||||
Canvas string `gorm:"column:canvas;not null;comment:Front end schema" json:"canvas"` // Front end schema
|
||||
InputParams string `gorm:"column:input_params;comment:Input schema" json:"input_params"` // Input schema
|
||||
OutputParams string `gorm:"column:output_params;comment:Output parameter schema" json:"output_params"` // Output parameter schema
|
||||
TestRunSuccess bool `gorm:"column:test_run_success;not null;comment:0 not running, 1 running successfully" json:"test_run_success"` // 0 not running, 1 running successfully
|
||||
Modified bool `gorm:"column:modified;not null;comment:0 has not been modified, 1 has been modified" json:"modified"` // 0 has not been modified, 1 has been modified
|
||||
UpdatedAt int64 `gorm:"column:updated_at;autoUpdateTime:milli;comment:Update Time in Milliseconds" json:"updated_at"` // Update Time in Milliseconds
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time" json:"deleted_at"` // Delete Time
|
||||
CommitID string `gorm:"column:commit_id;not null;comment:used to uniquely identify a draft snapshot" json:"commit_id"` // used to uniquely identify a draft snapshot
|
||||
}
|
||||
|
||||
// TableName WorkflowDraft's table name
|
||||
|
||||
@@ -6,7 +6,7 @@ package model
|
||||
|
||||
const TableNameWorkflowExecution = "workflow_execution"
|
||||
|
||||
// WorkflowExecution workflow 执行记录表,用于记录每次workflow执行时的状态
|
||||
// WorkflowExecution Workflow Execution Record Table, used to record the status of each workflow execution
|
||||
type WorkflowExecution struct {
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:execute id" json:"id"` // execute id
|
||||
WorkflowID int64 `gorm:"column:workflow_id;not null;comment:workflow_id" json:"workflow_id"` // workflow_id
|
||||
|
||||
@@ -10,25 +10,25 @@ import (
|
||||
|
||||
const TableNameWorkflowMeta = "workflow_meta"
|
||||
|
||||
// WorkflowMeta workflow 元信息表,用于记录workflow基本的元信息
|
||||
// WorkflowMeta The workflow metadata table,used to record the basic metadata of workflow
|
||||
type WorkflowMeta struct {
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:workflow id" json:"id"` // workflow id
|
||||
Name string `gorm:"column:name;not null;comment:workflow name" json:"name"` // workflow name
|
||||
Description string `gorm:"column:description;not null;comment:workflow description" json:"description"` // workflow description
|
||||
IconURI string `gorm:"column:icon_uri;not null;comment:icon uri" json:"icon_uri"` // icon uri
|
||||
Status int32 `gorm:"column:status;not null;comment:0:未发布过, 1:已发布过" json:"status"` // 0:未发布过, 1:已发布过
|
||||
ContentType int32 `gorm:"column:content_type;not null;comment:0用户 1官方" json:"content_type"` // 0用户 1官方
|
||||
Status int32 `gorm:"column:status;not null;comment:0: Not published, 1: Published" json:"status"` // 0: Not published, 1: Published
|
||||
ContentType int32 `gorm:"column:content_type;not null;comment:0 Users 1 Official" json:"content_type"` // 0 Users 1 Official
|
||||
Mode int32 `gorm:"column:mode;not null;comment:0:workflow, 3:chat_flow" json:"mode"` // 0:workflow, 3:chat_flow
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:create time in millisecond" json:"created_at"` // create time in millisecond
|
||||
UpdatedAt int64 `gorm:"column:updated_at;autoUpdateTime:milli;comment:update time in millisecond" json:"updated_at"` // update time in millisecond
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:delete time in millisecond" json:"deleted_at"` // delete time in millisecond
|
||||
CreatorID int64 `gorm:"column:creator_id;not null;comment:user id for creator" json:"creator_id"` // user id for creator
|
||||
Tag int32 `gorm:"column:tag;comment:template tag: Tag: 1=All, 2=Hot, 3=Information, 4=Music, 5=Picture, 6=UtilityTool, 7=Life, 8=Traval, 9=Network, 10=System, 11=Movie, 12=Office, 13=Shopping, 14=Education, 15=Health, 16=Social, 17=Entertainment, 18=Finance, 100=Hidden" json:"tag"` // template tag: Tag: 1=All, 2=Hot, 3=Information, 4=Music, 5=Picture, 6=UtilityTool, 7=Life, 8=Traval, 9=Network, 10=System, 11=Movie, 12=Office, 13=Shopping, 14=Education, 15=Health, 16=Social, 17=Entertainment, 18=Finance, 100=Hidden
|
||||
AuthorID int64 `gorm:"column:author_id;not null;comment:原作者用户 ID" json:"author_id"` // 原作者用户 ID
|
||||
SpaceID int64 `gorm:"column:space_id;not null;comment: 空间 ID" json:"space_id"` // 空间 ID
|
||||
UpdaterID int64 `gorm:"column:updater_id;comment: 更新元信息的用户 ID" json:"updater_id"` // 更新元信息的用户 ID
|
||||
SourceID int64 `gorm:"column:source_id;comment: 复制来源的 workflow ID" json:"source_id"` // 复制来源的 workflow ID
|
||||
AppID int64 `gorm:"column:app_id;comment:应用 ID" json:"app_id"` // 应用 ID
|
||||
AuthorID int64 `gorm:"column:author_id;not null;comment:Original author user ID" json:"author_id"` // Original author user ID
|
||||
SpaceID int64 `gorm:"column:space_id;not null;comment:space id" json:"space_id"` // space id
|
||||
UpdaterID int64 `gorm:"column:updater_id;comment:User ID for updating metadata" json:"updater_id"` // User ID for updating metadata
|
||||
SourceID int64 `gorm:"column:source_id;comment:Workflow ID of source" json:"source_id"` // Workflow ID of source
|
||||
AppID int64 `gorm:"column:app_id;comment:app id" json:"app_id"` // app id
|
||||
LatestVersion string `gorm:"column:latest_version;comment:the version of the most recent publish" json:"latest_version"` // the version of the most recent publish
|
||||
LatestVersionTs int64 `gorm:"column:latest_version_ts;comment:create time of latest version" json:"latest_version_ts"` // create time of latest version
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
const TableNameWorkflowReference = "workflow_reference"
|
||||
|
||||
// WorkflowReference workflow 关联关系表,用于记录workflow 直接互相引用关系
|
||||
// WorkflowReference The workflow association table,used to record the direct mutual reference relationship between workflows
|
||||
type WorkflowReference struct {
|
||||
ID int64 `gorm:"column:id;primaryKey;comment:workflow id" json:"id"` // workflow id
|
||||
ReferredID int64 `gorm:"column:referred_id;not null;comment:the id of the workflow that is referred by other entities" json:"referred_id"` // the id of the workflow that is referred by other entities
|
||||
@@ -19,7 +19,7 @@ type WorkflowReference struct {
|
||||
ReferringBizType int32 `gorm:"column:referring_biz_type;not null;comment:the biz type the referring entity belongs to: 1. workflow 2. agent" json:"referring_biz_type"` // the biz type the referring entity belongs to: 1. workflow 2. agent
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:create time in millisecond" json:"created_at"` // create time in millisecond
|
||||
Status int32 `gorm:"column:status;not null;comment:whether this reference currently takes effect. 0: disabled 1: enabled" json:"status"` // whether this reference currently takes effect. 0: disabled 1: enabled
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time" json:"deleted_at"` // Delete Time
|
||||
}
|
||||
|
||||
// TableName WorkflowReference's table name
|
||||
|
||||
@@ -8,13 +8,13 @@ const TableNameWorkflowSnapshot = "workflow_snapshot"
|
||||
|
||||
// WorkflowSnapshot snapshot for executed workflow draft
|
||||
type WorkflowSnapshot struct {
|
||||
WorkflowID int64 `gorm:"column:workflow_id;not null;comment:workflow id this snapshot belongs to" json:"workflow_id"` // workflow id this snapshot belongs to
|
||||
CommitID string `gorm:"column:commit_id;not null;comment:the commit id of the workflow draft" json:"commit_id"` // the commit id of the workflow draft
|
||||
Canvas string `gorm:"column:canvas;not null;comment:frontend schema for this snapshot" json:"canvas"` // frontend schema for this snapshot
|
||||
InputParams string `gorm:"column:input_params;comment:input parameter info" json:"input_params"` // input parameter info
|
||||
OutputParams string `gorm:"column:output_params;comment:output parameter info" json:"output_params"` // output parameter info
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli" json:"created_at"`
|
||||
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:ID" json:"id"` // ID
|
||||
WorkflowID int64 `gorm:"column:workflow_id;not null;comment:workflow id this snapshot belongs to" json:"workflow_id"` // workflow id this snapshot belongs to
|
||||
CommitID string `gorm:"column:commit_id;not null;comment:the commit id of the workflow draft" json:"commit_id"` // the commit id of the workflow draft
|
||||
Canvas string `gorm:"column:canvas;not null;comment:frontend schema for this snapshot" json:"canvas"` // frontend schema for this snapshot
|
||||
InputParams string `gorm:"column:input_params;comment:input parameter info" json:"input_params"` // input parameter info
|
||||
OutputParams string `gorm:"column:output_params;comment:output parameter info" json:"output_params"` // output parameter info
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:Create Time in Milliseconds" json:"created_at"` // Create Time in Milliseconds
|
||||
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:ID" json:"id"` // ID
|
||||
}
|
||||
|
||||
// TableName WorkflowSnapshot's table name
|
||||
|
||||
@@ -10,19 +10,19 @@ import (
|
||||
|
||||
const TableNameWorkflowVersion = "workflow_version"
|
||||
|
||||
// WorkflowVersion workflow 画布版本信息表,用于记录不同版本的画布信息
|
||||
// WorkflowVersion Workflow Canvas Version Information Table, used to record canvas information for different versions
|
||||
type WorkflowVersion struct {
|
||||
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:ID" json:"id"` // ID
|
||||
WorkflowID int64 `gorm:"column:workflow_id;not null;comment:workflow id" json:"workflow_id"` // workflow id
|
||||
Version string `gorm:"column:version;not null;comment:发布版本" json:"version"` // 发布版本
|
||||
VersionDescription string `gorm:"column:version_description;not null;comment:版本描述" json:"version_description"` // 版本描述
|
||||
Canvas string `gorm:"column:canvas;not null;comment:前端 schema" json:"canvas"` // 前端 schema
|
||||
InputParams string `gorm:"column:input_params" json:"input_params"`
|
||||
OutputParams string `gorm:"column:output_params" json:"output_params"`
|
||||
CreatorID int64 `gorm:"column:creator_id;not null;comment:发布用户 ID" json:"creator_id"` // 发布用户 ID
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:创建时间毫秒时间戳" json:"created_at"` // 创建时间毫秒时间戳
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:删除毫秒时间戳" json:"deleted_at"` // 删除毫秒时间戳
|
||||
CommitID string `gorm:"column:commit_id;not null;comment:the commit id corresponding to this version" json:"commit_id"` // the commit id corresponding to this version
|
||||
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:ID" json:"id"` // ID
|
||||
WorkflowID int64 `gorm:"column:workflow_id;not null;comment:workflow id" json:"workflow_id"` // workflow id
|
||||
Version string `gorm:"column:version;not null;comment:Published version" json:"version"` // Published version
|
||||
VersionDescription string `gorm:"column:version_description;not null;comment:Version Description" json:"version_description"` // Version Description
|
||||
Canvas string `gorm:"column:canvas;not null;comment:Front end schema" json:"canvas"` // Front end schema
|
||||
InputParams string `gorm:"column:input_params;comment:input params" json:"input_params"` // input params
|
||||
OutputParams string `gorm:"column:output_params;comment:output params" json:"output_params"` // output params
|
||||
CreatorID int64 `gorm:"column:creator_id;not null;comment:creator id" json:"creator_id"` // creator id
|
||||
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:Create Time in Milliseconds" json:"created_at"` // Create Time in Milliseconds
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time" json:"deleted_at"` // Delete Time
|
||||
CommitID string `gorm:"column:commit_id;not null;comment:the commit id corresponding to this version" json:"commit_id"` // the commit id corresponding to this version
|
||||
}
|
||||
|
||||
// TableName WorkflowVersion's table name
|
||||
|
||||
@@ -54,7 +54,7 @@ func newNodeExecution(db *gorm.DB, opts ...gen.DOOption) nodeExecution {
|
||||
return _nodeExecution
|
||||
}
|
||||
|
||||
// nodeExecution node 节点运行记录,用于记录每次workflow执行时,每个节点的状态信息
|
||||
// nodeExecution Node run record, used to record the status information of each node during each workflow execution
|
||||
type nodeExecution struct {
|
||||
nodeExecutionDo
|
||||
|
||||
|
||||
@@ -42,19 +42,19 @@ func newWorkflowDraft(db *gorm.DB, opts ...gen.DOOption) workflowDraft {
|
||||
return _workflowDraft
|
||||
}
|
||||
|
||||
// workflowDraft workflow 画布草稿表,用于记录workflow最新的草稿画布信息
|
||||
// workflowDraft Workflow canvas draft table, used to record the latest draft canvas information of workflow
|
||||
type workflowDraft struct {
|
||||
workflowDraftDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Int64 // workflow ID
|
||||
Canvas field.String // 前端 schema
|
||||
InputParams field.String // 入参 schema
|
||||
OutputParams field.String // 出参 schema
|
||||
TestRunSuccess field.Bool // 0 未运行, 1 运行成功
|
||||
Modified field.Bool // 0 未被修改, 1 已被修改
|
||||
UpdatedAt field.Int64
|
||||
DeletedAt field.Field
|
||||
Canvas field.String // Front end schema
|
||||
InputParams field.String // Input schema
|
||||
OutputParams field.String // Output parameter schema
|
||||
TestRunSuccess field.Bool // 0 not running, 1 running successfully
|
||||
Modified field.Bool // 0 has not been modified, 1 has been modified
|
||||
UpdatedAt field.Int64 // Update Time in Milliseconds
|
||||
DeletedAt field.Field // Delete Time
|
||||
CommitID field.String // used to uniquely identify a draft snapshot
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
|
||||
@@ -60,7 +60,7 @@ func newWorkflowExecution(db *gorm.DB, opts ...gen.DOOption) workflowExecution {
|
||||
return _workflowExecution
|
||||
}
|
||||
|
||||
// workflowExecution workflow 执行记录表,用于记录每次workflow执行时的状态
|
||||
// workflowExecution Workflow Execution Record Table, used to record the status of each workflow execution
|
||||
type workflowExecution struct {
|
||||
workflowExecutionDo
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ func newWorkflowMeta(db *gorm.DB, opts ...gen.DOOption) workflowMeta {
|
||||
return _workflowMeta
|
||||
}
|
||||
|
||||
// workflowMeta workflow 元信息表,用于记录workflow基本的元信息
|
||||
// workflowMeta The workflow metadata table,used to record the basic metadata of workflow
|
||||
type workflowMeta struct {
|
||||
workflowMetaDo
|
||||
|
||||
@@ -61,19 +61,19 @@ type workflowMeta struct {
|
||||
Name field.String // workflow name
|
||||
Description field.String // workflow description
|
||||
IconURI field.String // icon uri
|
||||
Status field.Int32 // 0:未发布过, 1:已发布过
|
||||
ContentType field.Int32 // 0用户 1官方
|
||||
Status field.Int32 // 0: Not published, 1: Published
|
||||
ContentType field.Int32 // 0 Users 1 Official
|
||||
Mode field.Int32 // 0:workflow, 3:chat_flow
|
||||
CreatedAt field.Int64 // create time in millisecond
|
||||
UpdatedAt field.Int64 // update time in millisecond
|
||||
DeletedAt field.Field // delete time in millisecond
|
||||
CreatorID field.Int64 // user id for creator
|
||||
Tag field.Int32 // template tag: Tag: 1=All, 2=Hot, 3=Information, 4=Music, 5=Picture, 6=UtilityTool, 7=Life, 8=Traval, 9=Network, 10=System, 11=Movie, 12=Office, 13=Shopping, 14=Education, 15=Health, 16=Social, 17=Entertainment, 18=Finance, 100=Hidden
|
||||
AuthorID field.Int64 // 原作者用户 ID
|
||||
SpaceID field.Int64 // 空间 ID
|
||||
UpdaterID field.Int64 // 更新元信息的用户 ID
|
||||
SourceID field.Int64 // 复制来源的 workflow ID
|
||||
AppID field.Int64 // 应用 ID
|
||||
AuthorID field.Int64 // Original author user ID
|
||||
SpaceID field.Int64 // space id
|
||||
UpdaterID field.Int64 // User ID for updating metadata
|
||||
SourceID field.Int64 // Workflow ID of source
|
||||
AppID field.Int64 // app id
|
||||
LatestVersion field.String // the version of the most recent publish
|
||||
LatestVersionTs field.Int64 // create time of latest version
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ func newWorkflowReference(db *gorm.DB, opts ...gen.DOOption) workflowReference {
|
||||
return _workflowReference
|
||||
}
|
||||
|
||||
// workflowReference workflow 关联关系表,用于记录workflow 直接互相引用关系
|
||||
// workflowReference The workflow association table,used to record the direct mutual reference relationship between workflows
|
||||
type workflowReference struct {
|
||||
workflowReferenceDo
|
||||
|
||||
@@ -53,7 +53,7 @@ type workflowReference struct {
|
||||
ReferringBizType field.Int32 // the biz type the referring entity belongs to: 1. workflow 2. agent
|
||||
CreatedAt field.Int64 // create time in millisecond
|
||||
Status field.Int32 // whether this reference currently takes effect. 0: disabled 1: enabled
|
||||
DeletedAt field.Field
|
||||
DeletedAt field.Field // Delete Time
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ type workflowSnapshot struct {
|
||||
Canvas field.String // frontend schema for this snapshot
|
||||
InputParams field.String // input parameter info
|
||||
OutputParams field.String // output parameter info
|
||||
CreatedAt field.Int64
|
||||
ID field.Int64 // ID
|
||||
CreatedAt field.Int64 // Create Time in Milliseconds
|
||||
ID field.Int64 // ID
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
|
||||
@@ -44,21 +44,21 @@ func newWorkflowVersion(db *gorm.DB, opts ...gen.DOOption) workflowVersion {
|
||||
return _workflowVersion
|
||||
}
|
||||
|
||||
// workflowVersion workflow 画布版本信息表,用于记录不同版本的画布信息
|
||||
// workflowVersion Workflow Canvas Version Information Table, used to record canvas information for different versions
|
||||
type workflowVersion struct {
|
||||
workflowVersionDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Int64 // ID
|
||||
WorkflowID field.Int64 // workflow id
|
||||
Version field.String // 发布版本
|
||||
VersionDescription field.String // 版本描述
|
||||
Canvas field.String // 前端 schema
|
||||
InputParams field.String
|
||||
OutputParams field.String
|
||||
CreatorID field.Int64 // 发布用户 ID
|
||||
CreatedAt field.Int64 // 创建时间毫秒时间戳
|
||||
DeletedAt field.Field // 删除毫秒时间戳
|
||||
Version field.String // Published version
|
||||
VersionDescription field.String // Version Description
|
||||
Canvas field.String // Front end schema
|
||||
InputParams field.String // input params
|
||||
OutputParams field.String // output params
|
||||
CreatorID field.Int64 // creator id
|
||||
CreatedAt field.Int64 // Create Time in Milliseconds
|
||||
DeletedAt field.Field // Delete Time
|
||||
CommitID field.String // the commit id corresponding to this version
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
|
||||
@@ -932,13 +932,13 @@ func (r *RepositoryImpl) MGetLatestVersion(ctx context.Context, policy *vo.MGetP
|
||||
|
||||
type combinedVersion struct {
|
||||
model.WorkflowMeta
|
||||
Version string `gorm:"column:version"` // 发布版本
|
||||
VersionDescription string `gorm:"column:version_description"` // 版本描述
|
||||
Canvas string `gorm:"column:canvas"` // 前端 schema
|
||||
Version string `gorm:"column:version"` // release version
|
||||
VersionDescription string `gorm:"column:version_description"` // version description
|
||||
Canvas string `gorm:"column:canvas"` // Front-end schema
|
||||
InputParams string `gorm:"column:input_params"`
|
||||
OutputParams string `gorm:"column:output_params"`
|
||||
VersionCreatorID int64 `gorm:"column:version_creator_id"` // 发布用户 ID
|
||||
VersionCreatedAt int64 `gorm:"column:version_created_at"` // 创建时间毫秒时间戳
|
||||
VersionCreatorID int64 `gorm:"column:version_creator_id"` // Publish user ID
|
||||
VersionCreatedAt int64 `gorm:"column:version_created_at"` // Creation time millisecond timestamp
|
||||
CommitID string `gorm:"column:commit_id"` // the commit id corresponding to this version
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user