From 4a9d3f990f48a03a96a209d0264b566679eb02dd Mon Sep 17 00:00:00 2001 From: dustoair <107600816+dustoair@users.noreply.github.com> Date: Fri, 17 Feb 2023 23:07:22 +0800 Subject: [PATCH] BinancePrice --- api/binancePrice.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/binancePrice.go b/api/binancePrice.go index 474099d..9ea57af 100644 --- a/api/binancePrice.go +++ b/api/binancePrice.go @@ -19,6 +19,11 @@ type BinancePrice struct { Price float64 } +// TableName 自定义表名 +func (BinancePrice) TableName() string { + return "BinancePrice" +} + func GetBinanceLatestPrice(symbol string) float64 { var binancePrice BinancePrice global.DB.Where("symbol = ?", symbol).Last(&binancePrice)