2026-02-08 22:59:08 +08:00
|
|
|
package models
|
|
|
|
|
|
2026-02-09 23:19:10 +08:00
|
|
|
import (
|
|
|
|
|
"git.apinb.com/bsm-sdk/core/database"
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
|
)
|
2026-02-09 18:28:00 +08:00
|
|
|
|
2026-02-08 22:59:08 +08:00
|
|
|
type MockPosition struct {
|
|
|
|
|
gorm.Model
|
2026-02-09 18:28:00 +08:00
|
|
|
Code string
|
|
|
|
|
OpenPrice float64
|
2026-02-08 22:59:08 +08:00
|
|
|
ClosePrice float64
|
2026-02-09 18:28:00 +08:00
|
|
|
Pnl float64
|
|
|
|
|
PnlRate float64
|
|
|
|
|
Status int `default:"0"`
|
|
|
|
|
}
|
2026-02-09 23:19:10 +08:00
|
|
|
|
|
|
|
|
func (m *MockPosition) TableName() string { return "mock_positions" }
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
database.AppendMigrate(&MockPosition{})
|
|
|
|
|
}
|