add mock order.
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user