chore: replace all cn comments to en version by volc api (#313)

This commit is contained in:
tecvan
2025-07-31 15:18:11 +08:00
committed by GitHub
parent 91d6cdb430
commit 5abc63fba6
254 changed files with 5899 additions and 5844 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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