model

package
v0.0.0-...-db8959b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameDayQuote = "day_quotes"
View Source
const TableNameMarketInfo = "market_infos"

Variables

This section is empty.

Functions

This section is empty.

Types

type DayQuote

type DayQuote struct {
	ID              int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Exchange        string    `gorm:"column:exchange;not null;comment:交易所名称" json:"exchange"`         // 交易所名称
	VarietyID       string    `gorm:"column:variety_id;not null;comment:品种id" json:"variety_id"`      // 品种id
	ContractID      string    `gorm:"column:contract_id;not null;comment:合约id" json:"contract_id"`    // 合约id
	OpenPrice       string    `gorm:"column:open_price;comment:开盘价" json:"open_price"`                // 开盘价
	ClosePrice      string    `gorm:"column:close_price;comment:收盘价" json:"close_price"`              // 收盘价
	HighPrice       string    `gorm:"column:high_price;comment:最高价" json:"high_price"`                // 最高价
	LowPrice        string    `gorm:"column:low_price;comment:最低价" json:"low_price"`                  // 最低价
	SettlePrice     string    `gorm:"column:settle_price;comment:结算价" json:"settle_price"`            // 结算价
	LastSettlePrice string    `gorm:"column:last_settle_price;comment:昨结算价" json:"last_settle_price"` // 昨结算价
	TotalMatQty     int64     `gorm:"column:total_mat_qty;comment:成交量" json:"total_mat_qty"`          // 成交量
	TotalPos        int64     `gorm:"column:total_pos;comment:持仓量" json:"total_pos"`                  // 持仓量
	Turnover        float64   `gorm:"column:turnover" json:"turnover"`
	Delta           string    `gorm:"column:delta;comment:delta" json:"delta"`     // delta
	ImpVol          string    `gorm:"column:imp_vol;comment:隐含波动率" json:"imp_vol"` // 隐含波动率
	CreatedAt       time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
	QuotType        int32     `gorm:"column:quot_type;comment:合约类型" json:"quot_type"` // 合约类型
	CpFlag          string    `gorm:"column:cp_flag;comment:期权CP类型" json:"cp_flag"`   // 期权CP类型
	Date            time.Time `gorm:"column:date;not null" json:"date"`
}

DayQuote mapped from table <day_quotes>

func (*DayQuote) TableName

func (*DayQuote) TableName() string

TableName DayQuote's table name

type MarketInfo

type MarketInfo struct {
	ID         int32  `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	TradeDate  string `gorm:"column:trade_date;not null" json:"trade_date"`
	MarketData string `gorm:"column:market_data" json:"market_data"`
	Type       int32  `gorm:"column:type" json:"type"`
}

MarketInfo mapped from table <market_infos>

func (*MarketInfo) TableName

func (*MarketInfo) TableName() string

TableName MarketInfo's table name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL