package models

import (
	"go-admin/common/models"

	"github.com/shopspring/decimal"
)

type LineReverseSetting struct {
	models.Model

	ReverseOrderType    string          `json:"reverseOrderType" redis:"reverseOrderType" gorm:"type:varchar(10);comment:反单下单类型 LIMIT-限价 MARKET-市价"`
	ReversePremiumRatio decimal.Decimal `json:"reversePremiumRatio" redis:"reversePremiumRatio" gorm:"type:decimal(10,2);comment:溢价百分比"`
	TakeProfitRatio     decimal.Decimal `json:"takeProfitRatio" redis:"takeProfitRatio" gorm:"type:decimal(10,2);comment:止盈百分比"`
	StopLossRatio       decimal.Decimal `json:"stopLossRatio" redis:"stopLossRatio" gorm:"type:decimal(10,2);comment:止损百分比"`
	models.ModelTime
	models.ControlBy
}

func (LineReverseSetting) TableName() string {
	return "line_reverse_setting"
}

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

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