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,27 +6,27 @@ package model
const TableNameMessage = "message"
// Message 消息表
// Message message record
type Message struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键ID" json:"id"` // 主键ID
RunID int64 `gorm:"column:run_id;not null;comment:对应的run_id" json:"run_id"` // 对应的run_id
ConversationID int64 `gorm:"column:conversation_id;not null;comment:conversation id" json:"conversation_id"` // conversation id
UserID string `gorm:"column:user_id;not null;comment:user id" json:"user_id"` // user id
AgentID int64 `gorm:"column:agent_id;not null;comment:agent_id" json:"agent_id"` // agent_id
Role string `gorm:"column:role;not null;comment:角色: user、assistant、system" json:"role"` // 角色: user、assistant、system
ContentType string `gorm:"column:content_type;not null;comment:内容类型 1 text" json:"content_type"` // 内容类型 1 text
Content string `gorm:"column:content;comment:内容" json:"content"` // 内容
MessageType string `gorm:"column:message_type;not null;comment:消息类型:" json:"message_type"` // 消息类型:
DisplayContent string `gorm:"column:display_content;comment:展示内容" json:"display_content"` // 展示内容
Ext string `gorm:"column:ext;comment:message 扩展字段" json:"ext"` // message 扩展字段
SectionID int64 `gorm:"column:section_id;comment:段落id" json:"section_id"` // 段落id
BrokenPosition int32 `gorm:"column:broken_position;default:-1;comment:打断位置" json:"broken_position"` // 打断位置
Status int32 `gorm:"column:status;not null;comment:消息状态 1 Available 2 Deleted 3 Replaced 4 Broken 5 Failed 6 Streaming 7 Pending" json:"status"` // 消息状态 1 Available 2 Deleted 3 Replaced 4 Broken 5 Failed 6 Streaming 7 Pending
ModelContent string `gorm:"column:model_content;comment:模型输入内容" json:"model_content"` // 模型输入内容
MetaInfo string `gorm:"column:meta_info;comment:引用、高亮等文本标记信息" json:"meta_info"` // 引用、高亮等文本标记信息
ReasoningContent string `gorm:"column:reasoning_content;comment:思考内容" json:"reasoning_content"` // 思考内容
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:创建时间" json:"created_at"` // 创建时间
UpdatedAt int64 `gorm:"column:updated_at;not null;autoUpdateTime:milli;comment:更新时间" json:"updated_at"` // 更新时间
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:id" json:"id"` // id
RunID int64 `gorm:"column:run_id;not null;comment:run_id" json:"run_id"` // run_id
ConversationID int64 `gorm:"column:conversation_id;not null;comment:conversation id" json:"conversation_id"` // conversation id
UserID string `gorm:"column:user_id;not null;comment:user id" json:"user_id"` // user id
AgentID int64 `gorm:"column:agent_id;not null;comment:agent_id" json:"agent_id"` // agent_id
Role string `gorm:"column:role;not null;comment:role: user、assistant、system" json:"role"` // role: user、assistant、system
ContentType string `gorm:"column:content_type;not null;comment:content type 1 text" json:"content_type"` // content type 1 text
Content string `gorm:"column:content;comment:content" json:"content"` // content
MessageType string `gorm:"column:message_type;not null;comment:message_type" json:"message_type"` // message_type
DisplayContent string `gorm:"column:display_content;comment:display content" json:"display_content"` // display content
Ext string `gorm:"column:ext;comment:message ext" json:"ext"` // message ext
SectionID int64 `gorm:"column:section_id;comment:section_id" json:"section_id"` // section_id
BrokenPosition int32 `gorm:"column:broken_position;default:-1;comment:broken position" json:"broken_position"` // broken position
Status int32 `gorm:"column:status;not null;comment:message status: 1 Available 2 Deleted 3 Replaced 4 Broken 5 Failed 6 Streaming 7 Pending" json:"status"` // message status: 1 Available 2 Deleted 3 Replaced 4 Broken 5 Failed 6 Streaming 7 Pending
ModelContent string `gorm:"column:model_content;comment:model content" json:"model_content"` // model content
MetaInfo string `gorm:"column:meta_info;comment:text tagging information such as citation and highlighting" json:"meta_info"` // text tagging information such as citation and highlighting
ReasoningContent string `gorm:"column:reasoning_content;comment:reasoning content" json:"reasoning_content"` // reasoning content
CreatedAt int64 `gorm:"column:created_at;not null;autoCreateTime:milli;comment:Create Time in Milliseconds" json:"created_at"` // Create Time in Milliseconds
UpdatedAt int64 `gorm:"column:updated_at;not null;autoUpdateTime:milli;comment:Update Time in Milliseconds" json:"updated_at"` // Update Time in Milliseconds
}
// TableName Message's table name

View File

@@ -52,30 +52,30 @@ func newMessage(db *gorm.DB, opts ...gen.DOOption) message {
return _message
}
// message 消息表
// message message record
type message struct {
messageDo
ALL field.Asterisk
ID field.Int64 // 主键ID
RunID field.Int64 // 对应的run_id
ID field.Int64 // id
RunID field.Int64 // run_id
ConversationID field.Int64 // conversation id
UserID field.String // user id
AgentID field.Int64 // agent_id
Role field.String // 角色: user、assistant、system
ContentType field.String // 内容类型 1 text
Content field.String // 内容
MessageType field.String // 消息类型:
DisplayContent field.String // 展示内容
Ext field.String // message 扩展字段
SectionID field.Int64 // 段落id
BrokenPosition field.Int32 // 打断位置
Status field.Int32 // 消息状态 1 Available 2 Deleted 3 Replaced 4 Broken 5 Failed 6 Streaming 7 Pending
ModelContent field.String // 模型输入内容
MetaInfo field.String // 引用、高亮等文本标记信息
ReasoningContent field.String // 思考内容
CreatedAt field.Int64 // 创建时间
UpdatedAt field.Int64 // 更新时间
Role field.String // role: user、assistant、system
ContentType field.String // content type 1 text
Content field.String // content
MessageType field.String // message_type
DisplayContent field.String // display content
Ext field.String // message ext
SectionID field.Int64 // section_id
BrokenPosition field.Int32 // broken position
Status field.Int32 // message status: 1 Available 2 Deleted 3 Replaced 4 Broken 5 Failed 6 Streaming 7 Pending
ModelContent field.String // model content
MetaInfo field.String // text tagging information such as citation and highlighting
ReasoningContent field.String // reasoning content
CreatedAt field.Int64 // Create Time in Milliseconds
UpdatedAt field.Int64 // Update Time in Milliseconds
fieldMap map[string]field.Expr
}