|
@@ -11,6 +11,14 @@ import (
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+// 训练状态
|
|
|
|
+const (
|
|
|
|
+ RunStatusWaiting = "待运行"
|
|
|
|
+ RunStatusTraining = "运行中"
|
|
|
|
+ RunStatusSuccess = "运行成功"
|
|
|
|
+ RunStatusFailed = "运行失败"
|
|
|
|
+)
|
|
|
|
+
|
|
// AiPredictModelIndex AI预测模型标的
|
|
// AiPredictModelIndex AI预测模型标的
|
|
type AiPredictModelIndex struct {
|
|
type AiPredictModelIndex struct {
|
|
AiPredictModelIndexId int `orm:"column(ai_predict_model_index_id);pk" gorm:"primaryKey"`
|
|
AiPredictModelIndexId int `orm:"column(ai_predict_model_index_id);pk" gorm:"primaryKey"`
|
|
@@ -33,6 +41,8 @@ type AiPredictModelIndex struct {
|
|
ModifyTime time.Time `description:"修改时间"`
|
|
ModifyTime time.Time `description:"修改时间"`
|
|
AiPredictModelIndexConfigId int `gorm:"column:ai_predict_model_index_config_id" description:"标的当前的配置id"`
|
|
AiPredictModelIndexConfigId int `gorm:"column:ai_predict_model_index_config_id" description:"标的当前的配置id"`
|
|
ScriptPath string `gorm:"column:script_path" description:"脚本的路径"`
|
|
ScriptPath string `gorm:"column:script_path" description:"脚本的路径"`
|
|
|
|
+ TrainStatus string `gorm:"column:train_status" description:"训练状态,枚举值:待训练,训练中,训练成功,训练失败"`
|
|
|
|
+ RunStatus string `gorm:"column:run_status" description:"运行状态,枚举值:待运行,运行中,运行成功,运行失败"`
|
|
}
|
|
}
|
|
|
|
|
|
func (m *AiPredictModelIndex) TableName() string {
|
|
func (m *AiPredictModelIndex) TableName() string {
|
|
@@ -59,6 +69,8 @@ type AiPredictModelIndexCols struct {
|
|
ModifyTime string
|
|
ModifyTime string
|
|
AiPredictModelIndexConfigId string
|
|
AiPredictModelIndexConfigId string
|
|
ScriptPath string
|
|
ScriptPath string
|
|
|
|
+ TrainStatus string
|
|
|
|
+ RunStatus string
|
|
}
|
|
}
|
|
|
|
|
|
func (m *AiPredictModelIndex) Cols() AiPredictModelIndexCols {
|
|
func (m *AiPredictModelIndex) Cols() AiPredictModelIndexCols {
|
|
@@ -82,6 +94,8 @@ func (m *AiPredictModelIndex) Cols() AiPredictModelIndexCols {
|
|
ModifyTime: "modify_time",
|
|
ModifyTime: "modify_time",
|
|
AiPredictModelIndexConfigId: "ai_predict_model_index_config_id",
|
|
AiPredictModelIndexConfigId: "ai_predict_model_index_config_id",
|
|
ScriptPath: "script_path",
|
|
ScriptPath: "script_path",
|
|
|
|
+ TrainStatus: "train_status",
|
|
|
|
+ RunStatus: "run_status",
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -225,6 +239,8 @@ type AiPredictModelIndexItem struct {
|
|
SearchText string `description:"搜索结果(含高亮)"`
|
|
SearchText string `description:"搜索结果(含高亮)"`
|
|
AiPredictModelIndexConfigId int `gorm:"column:ai_predict_model_index_config_id" description:"标的当前的配置id"`
|
|
AiPredictModelIndexConfigId int `gorm:"column:ai_predict_model_index_config_id" description:"标的当前的配置id"`
|
|
ScriptPath string `gorm:"column:script_path" description:"脚本的路径"`
|
|
ScriptPath string `gorm:"column:script_path" description:"脚本的路径"`
|
|
|
|
+ TrainStatus string `gorm:"column:train_status" description:"训练状态,枚举值:待训练,训练中,训练成功,训练失败"`
|
|
|
|
+ RunStatus string `gorm:"column:run_status" description:"运行状态,枚举值:待运行,运行中,运行成功,运行失败"`
|
|
}
|
|
}
|
|
|
|
|
|
func (m *AiPredictModelIndex) Format2Item() (item *AiPredictModelIndexItem) {
|
|
func (m *AiPredictModelIndex) Format2Item() (item *AiPredictModelIndexItem) {
|
|
@@ -244,6 +260,8 @@ func (m *AiPredictModelIndex) Format2Item() (item *AiPredictModelIndexItem) {
|
|
item.SysUserRealName = m.SysUserRealName
|
|
item.SysUserRealName = m.SysUserRealName
|
|
item.AiPredictModelIndexConfigId = m.AiPredictModelIndexConfigId
|
|
item.AiPredictModelIndexConfigId = m.AiPredictModelIndexConfigId
|
|
item.ScriptPath = m.ScriptPath
|
|
item.ScriptPath = m.ScriptPath
|
|
|
|
+ item.TrainStatus = m.TrainStatus
|
|
|
|
+ item.RunStatus = m.RunStatus
|
|
item.CreateTime = utils.TimeTransferString(utils.FormatDateTime, m.CreateTime)
|
|
item.CreateTime = utils.TimeTransferString(utils.FormatDateTime, m.CreateTime)
|
|
item.ModifyTime = utils.TimeTransferString(utils.FormatDateTime, m.ModifyTime)
|
|
item.ModifyTime = utils.TimeTransferString(utils.FormatDateTime, m.ModifyTime)
|
|
return
|
|
return
|