package models

import (
	"go-admin/common/models"

	"github.com/shopspring/decimal"
)

type LineSystemSetting struct {
	models.Model

	Time                      int64           `json:"time" gorm:"type:int;comment:导入:挂单时长达到时间后失效"`
	BatchTime                 int64           `json:"batchTime" gorm:"type:int;comment:批量:挂单时长达到时间后失效"`
	ProfitRate                string          `json:"profitRate" gorm:"type:decimal(10,2);comment:平仓盈利比例"`
	CoverOrderTypeBRate       string          `json:"coverOrderTypeBRate" gorm:"type:decimal(10,2);comment:b账户限价补单的买入百分比"`
	StopLossPremium           decimal.Decimal `json:"stopLossPremium" gorm:"type:decimal(10,2);comment:限价止损溢价百分比"`
	AddPositionPremium        decimal.Decimal `json:"addPositionPremium" gorm:"type:decimal(10,2);comment:限价加仓溢价百分比`
	ReducePremium             decimal.Decimal `json:"reducePremium" gorm:"type:decimal(10,2);comment:限价减仓溢价百分比"`
	ReduceEarlyTriggerPercent decimal.Decimal `json:"reduceEarlyTriggerPercent" gorm:"type:decimal(10,2);comment:减仓提前触发百分比"`
	models.ModelTime
	models.ControlBy
}

func (LineSystemSetting) TableName() string {
	return "line_system_setting"
}

func (e *LineSystemSetting) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *LineSystemSetting) GetId() interface{} {
	return e.Id
}
