25 lines
567 B
Go
25 lines
567 B
Go
package models
|
|
|
|
import "git.apinb.com/bsm-sdk/core/database"
|
|
|
|
// StockBasic 股票参数配置表
|
|
type StockArgs struct {
|
|
ID uint `gorm:"primarykey"`
|
|
TsCode string `gorm:"type:varchar(50);not null;index;comment:TS代码"`
|
|
Config string `gorm:"type:varchar(1000);not null;index;comment:配置项"`
|
|
RsiPeriod int
|
|
RsiOversold int
|
|
RsiOverbought int
|
|
EmaFast int
|
|
EmaSlow int
|
|
}
|
|
|
|
func init() {
|
|
database.AppendMigrate(&StockArgs{})
|
|
}
|
|
|
|
// TableName 设置表名
|
|
func (StockArgs) TableName() string {
|
|
return "stock_args"
|
|
}
|