Checks / verify (push) Failing after 9m52s
统一单入口 Go 工程与前端依赖目录,增加后台供应商配置、候选审核、计划预算、成交冲正、持仓复盘和站内通知。接入策略版本、Python 回测、可配置 A 股公开行情及 zap 文件轮转日志,补充迁移、契约与验证。
43 lines
1.5 KiB
Go
43 lines
1.5 KiB
Go
package model
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
type HistoricalBar struct {
|
|
Date string `json:"date"`
|
|
Open string `json:"open"`
|
|
High string `json:"high"`
|
|
Low string `json:"low"`
|
|
Close string `json:"close"`
|
|
}
|
|
type BacktestInput struct {
|
|
DataOrigin string `json:"data_origin"`
|
|
SourceVersion int64 `json:"source_version"`
|
|
DataReceivedAt *time.Time `json:"data_received_at"`
|
|
StrategyVersionID string `json:"strategy_version_id"`
|
|
DatasetName string `json:"dataset_name"`
|
|
Symbol string `json:"symbol"`
|
|
InitialCash string `json:"initial_cash"`
|
|
Bars []HistoricalBar `json:"bars"`
|
|
}
|
|
type ResearchInput struct {
|
|
BacktestInput
|
|
Parameters StrategyParameters `json:"parameters"`
|
|
}
|
|
type BacktestRun struct {
|
|
ID string `db:"id" json:"id"`
|
|
StrategyVersionID string `db:"strategy_version_id" json:"strategy_version_id"`
|
|
Status string `db:"status" json:"status"`
|
|
Input json.RawMessage `db:"input" json:"input,omitempty"`
|
|
InputHash string `db:"input_hash" json:"input_hash"`
|
|
Result json.RawMessage `db:"result" json:"result"`
|
|
Failure string `db:"failure" json:"failure"`
|
|
LeaseID *string `db:"lease_id" json:"-"`
|
|
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
|
FinishedAt *time.Time `db:"finished_at" json:"finished_at"`
|
|
}
|
|
|
|
func (BacktestRun) TableName() string { return "veyra_backtest_run" }
|