package models

import (
	"go-admin/common/models"

	"github.com/shopspring/decimal"
)

type LineSymbol struct {
	models.Model

	ExchangeType string          `json:"exchangeType" gorm:"type:varchar(20);comment:交易所类型 字典 exchange_type"`
	ApiId        string          `json:"apiId" gorm:"type:int;comment:api账户id"`
	Symbol       string          `json:"symbol" gorm:"type:varchar(32);comment:交易对"`
	BaseAsset    string          `json:"baseAsset" gorm:"type:varchar(255);comment:基础货币"`
	QuoteAsset   string          `json:"quoteAsset" gorm:"type:varchar(255);comment:计价货币"`
	Switch       string          `json:"switch" gorm:"type:enum('0','1');comment:状态"`
	Type         string          `json:"type" gorm:"type:enum('1','2');comment:交易对类型"`
	Number       int             `json:"number" gorm:"->"`
	LastPrice    decimal.Decimal `json:"lastPrice"gorm:"->"`
	models.ModelTime
	models.ControlBy
}

func (LineSymbol) TableName() string {
	return "line_symbol"
}

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

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