This commit is contained in:
2026-01-17 01:27:31 +08:00
parent 8b548dd13e
commit e11928e3e3
2 changed files with 4 additions and 4 deletions

View File

@@ -7,8 +7,8 @@ import (
// LastDaily 股票日线数据 // LastDaily 股票日线数据
type StockDaily struct { type StockDaily struct {
ID uint `gorm:"primarykey;autoIncrement" json:"id"` ID uint `gorm:"primarykey;autoIncrement" json:"id"`
TsCode string `gorm:"type:varchar(20);not null;index:idx_ts_code;comment:股票代码" json:"ts_code"` TsCode string `gorm:"type:varchar(20);not null;index:idx_ts_code_trade_date;comment:股票代码" json:"ts_code"`
TradeDate string `gorm:"type:date;not null;index:idx_trade_date;comment:交易日期" json:"trade_date"` TradeDate string `gorm:"type:date;not null;index:idx_ts_code_trade_date;comment:交易日期" json:"trade_date"`
Open float64 `gorm:"type:decimal(10,4);comment:开盘价" json:"open"` Open float64 `gorm:"type:decimal(10,4);comment:开盘价" json:"open"`
High float64 `gorm:"type:decimal(10,4);comment:最高价" json:"high"` High float64 `gorm:"type:decimal(10,4);comment:最高价" json:"high"`
Low float64 `gorm:"type:decimal(10,4);comment:最低价" json:"low"` Low float64 `gorm:"type:decimal(10,4);comment:最低价" json:"low"`

View File

@@ -7,8 +7,8 @@ import (
// StockIndicator 股票日线数据模型 // StockIndicator 股票日线数据模型
type StockIndicator struct { type StockIndicator struct {
ID uint `gorm:"primarykey;autoIncrement"` ID uint `gorm:"primarykey;autoIncrement"`
TsCode string `gorm:"type:varchar(20);not null;comment:TS股票代码;index:idx_ts_code"` TsCode string `gorm:"type:varchar(20);not null;comment:TS股票代码;index:idx_ts_code_trade_date"`
TradeDate string `gorm:"type:date;not null;comment:交易日期;index:idx_trade_date;index:idx_ts_trade,priority:2"` TradeDate string `gorm:"type:date;not null;comment:交易日期;index:idx_ts_code_trade_date"`
Close float64 `gorm:"type:decimal(10,4);comment:当日收盘价"` Close float64 `gorm:"type:decimal(10,4);comment:当日收盘价"`
TurnoverRate float64 `gorm:"type:decimal(10,6);comment:换手率(%)"` TurnoverRate float64 `gorm:"type:decimal(10,6);comment:换手率(%)"`
TurnoverRateF float64 `gorm:"type:decimal(10,6);comment:换手率(自由流通股)"` TurnoverRateF float64 `gorm:"type:decimal(10,6);comment:换手率(自由流通股)"`