chore: replace all cn comments to en version by volc api (#313)
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user