新增注释
This commit is contained in:
+17
-17
@@ -2,30 +2,30 @@ package model
|
||||
|
||||
import "time"
|
||||
|
||||
// StockDaily 对应数据库中的 stock_daily 表
|
||||
// StockDaily 对应数据库中的 stock_daily 表,保存单只股票每日行情。
|
||||
type StockDaily struct {
|
||||
TsCode string `gorm:"column:ts_code" json:"ts_code"`
|
||||
TradeDate time.Time `gorm:"column:trade_date" json:"trade_date"`
|
||||
Open float64 `gorm:"column:open" json:"open"`
|
||||
High float64 `gorm:"column:high" json:"high"`
|
||||
Low float64 `gorm:"column:low" json:"low"`
|
||||
Close float64 `gorm:"column:close" json:"close"`
|
||||
PctChg float64 `gorm:"column:pct_chg" json:"pct_chg"`
|
||||
Vol float64 `gorm:"column:vol" json:"vol"`
|
||||
TsCode string `gorm:"column:ts_code" json:"ts_code"` // 股票代码,通常为 TuShare ts_code。
|
||||
TradeDate time.Time `gorm:"column:trade_date" json:"trade_date"` // 交易日期。
|
||||
Open float64 `gorm:"column:open" json:"open"` // 开盘价。
|
||||
High float64 `gorm:"column:high" json:"high"` // 最高价。
|
||||
Low float64 `gorm:"column:low" json:"low"` // 最低价。
|
||||
Close float64 `gorm:"column:close" json:"close"` // 收盘价。
|
||||
PctChg float64 `gorm:"column:pct_chg" json:"pct_chg"` // 当日涨跌幅。
|
||||
Vol float64 `gorm:"column:vol" json:"vol"` // 成交量。
|
||||
}
|
||||
|
||||
// AnalyzeRequest 用于接收前端 POST 请求的参数
|
||||
// AnalyzeRequest 用于接收前端 POST 请求的分析区间参数。
|
||||
type AnalyzeRequest struct {
|
||||
StartDate string `json:"start_date"`
|
||||
EndDate string `json:"end_date"`
|
||||
StartDate string `json:"start_date"` // 起始交易日。
|
||||
EndDate string `json:"end_date"` // 结束交易日。
|
||||
}
|
||||
|
||||
// AnalysisResponse 用于向前端返回分析结果
|
||||
// AnalysisResponse 用于向前端返回涨停后走势分析结果。
|
||||
type AnalysisResponse struct {
|
||||
Code string `json:"code"`
|
||||
Name string `json:"name"`
|
||||
DayOpen float64 `json:"day_open"`
|
||||
DayHigh float64 `json:"day_high"`
|
||||
Code string `json:"code"` // 股票代码。
|
||||
Name string `json:"name"` // 股票简称。
|
||||
DayOpen float64 `json:"day_open"` // 涨停日开盘价。
|
||||
DayHigh float64 `json:"day_high"` // 涨停日最高价。
|
||||
MaxHigh float64 `json:"max_high"` // 逻辑最高点(用于计算降幅)
|
||||
MaxDate string `json:"max_date"` // 逻辑最高点日期
|
||||
OverallMaxHigh float64 `json:"overall_max_high"` // 区间绝对最高点
|
||||
|
||||
Reference in New Issue
Block a user