34 lines
1.0 KiB
Go
34 lines
1.0 KiB
Go
package models
|
|
|
|
import (
|
|
"go-admin/common/models"
|
|
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type LineStrategyTemplate struct {
|
|
models.Model
|
|
|
|
Name string `json:"name" gorm:"type:varchar(50);comment:策略名称"`
|
|
Direction int `json:"direction" gorm:"type:tinyint;comment:涨跌方向 1-涨 2-跌"`
|
|
Percentag decimal.Decimal `json:"percentag" gorm:"type:decimal(10,2);comment:涨跌点数"`
|
|
CompareType int `json:"compareType" gorm:"type:tinyint;comment:比较类型 1-大于 2-大于等于 3-小于 4-小于等于 5等于 "`
|
|
TimeSlotStart int `json:"timeSlotStart" gorm:"type:int;comment:时间段开始(分)"`
|
|
// TimeSlotEnd int `json:"timeSlotEnd" gorm:"type:int;comment:时间断截至(分)"`
|
|
models.ModelTime
|
|
models.ControlBy
|
|
}
|
|
|
|
func (LineStrategyTemplate) TableName() string {
|
|
return "line_strategy_template"
|
|
}
|
|
|
|
func (e *LineStrategyTemplate) Generate() models.ActiveRecord {
|
|
o := *e
|
|
return &o
|
|
}
|
|
|
|
func (e *LineStrategyTemplate) GetId() interface{} {
|
|
return e.Id
|
|
}
|