Checks / verify (push) Failing after 9m52s
统一单入口 Go 工程与前端依赖目录,增加后台供应商配置、候选审核、计划预算、成交冲正、持仓复盘和站内通知。接入策略版本、Python 回测、可配置 A 股公开行情及 zap 文件轮转日志,补充迁移、契约与验证。
43 lines
1.6 KiB
Go
43 lines
1.6 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
type StrategyParameters struct {
|
|
ShortWindow int `json:"short_window"`
|
|
LongWindow int `json:"long_window"`
|
|
FeeBPS int `json:"fee_bps"`
|
|
SlippageBPS int `json:"slippage_bps"`
|
|
LotSize int64 `json:"lot_size"`
|
|
}
|
|
type Strategy struct {
|
|
ID string `db:"id" json:"id"`
|
|
Code string `db:"code" json:"code"`
|
|
Name string `db:"name" json:"name"`
|
|
Status string `db:"status" json:"status"`
|
|
LatestRevision int `db:"latest_revision" json:"latest_revision"`
|
|
ActiveVersionID *string `db:"active_version_id" json:"active_version_id"`
|
|
Version int64 `db:"version" json:"version"`
|
|
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
|
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
|
|
}
|
|
|
|
func (Strategy) TableName() string { return "veyra_strategy" }
|
|
|
|
type StrategyVersion struct {
|
|
ID string `db:"id" json:"id"`
|
|
StrategyID string `db:"strategy_id" json:"strategy_id"`
|
|
Revision int `db:"revision" json:"revision"`
|
|
Algorithm string `db:"algorithm" json:"algorithm"`
|
|
Parameters StrategyParameters `db:"parameters" json:"parameters"`
|
|
Description string `db:"description" json:"description"`
|
|
AuthorID string `db:"author_id" json:"author_id"`
|
|
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
|
}
|
|
|
|
func (StrategyVersion) TableName() string { return "veyra_strategy_version" }
|
|
|
|
type StrategyDetail struct {
|
|
Strategy
|
|
Versions []StrategyVersion `json:"versions"`
|
|
}
|