add mock order.

This commit is contained in:
yanweidong
2026-02-09 18:28:00 +08:00
parent 8a6b129ba6
commit b9f522b101
10 changed files with 141 additions and 13 deletions

View File

@@ -1,11 +1,13 @@
package models
import "gorm.io/gorm"
type MockPosition struct {
gorm.Model
Code string
OpenPrice float64
Code string
OpenPrice float64
ClosePrice float64
Pnl float64
PnlRate float64
Status int
}
Pnl float64
PnlRate float64
Status int `default:"0"`
}

View File

@@ -52,10 +52,10 @@ func (StratModel) TableName() string {
return "strat_model"
}
func NewStratModel(key, code string) *StratModel {
func NewStratModel(key, code string, ymd int) *StratModel {
obj := StratModel{
StratKey: key,
Ymd: GetYmd(),
Ymd: ymd,
Code: code,
}
return &obj