From 7a808a1465f1823f2ca527be53ba8d38492fb043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=BE=E7=90=83?= Date: Fri, 6 Mar 2026 08:40:00 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20TiingoTicker=20?= =?UTF-8?q?=E8=82=A1=E7=A5=A8=E4=BB=A3=E7=A0=81=E5=AD=97=E5=85=B8=E5=AE=9E?= =?UTF-8?q?=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AssetManager.Data/DatabaseService.cs | 3 +- AssetManager.Data/TiingoTicker.cs | 62 ++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 AssetManager.Data/TiingoTicker.cs diff --git a/AssetManager.Data/DatabaseService.cs b/AssetManager.Data/DatabaseService.cs index 9a55f30..0c45506 100644 --- a/AssetManager.Data/DatabaseService.cs +++ b/AssetManager.Data/DatabaseService.cs @@ -18,7 +18,8 @@ public class DatabaseService typeof(Strategy), typeof(Portfolio), typeof(Position), - typeof(Transaction) + typeof(Transaction), + typeof(TiingoTicker) ); } diff --git a/AssetManager.Data/TiingoTicker.cs b/AssetManager.Data/TiingoTicker.cs new file mode 100644 index 0000000..255c349 --- /dev/null +++ b/AssetManager.Data/TiingoTicker.cs @@ -0,0 +1,62 @@ +using SqlSugar; + +namespace AssetManager.Data; + +/// +/// Tiingo 股票代码字典表 +/// +[SugarTable("tiingo_tickers")] +public class TiingoTicker +{ + /// + /// 主键 ID + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + + /// + /// 标的代码(ticker) + /// + [SugarColumn(ColumnDataType = "varchar(50)")] + public string? Ticker { get; set; } + + /// + /// 交易所(exchange) + /// + [SugarColumn(ColumnDataType = "varchar(50)")] + public string? Exchange { get; set; } + + /// + /// 资产类型(assetType) + /// + [SugarColumn(ColumnDataType = "varchar(50)")] + public string? AssetType { get; set; } + + /// + /// 计价货币(priceCurrency) + /// + [SugarColumn(ColumnDataType = "varchar(10)")] + public string? PriceCurrency { get; set; } + + /// + /// 数据开始日期(startDate) + /// + [SugarColumn(IsNullable = true)] + public DateTime? StartDate { get; set; } + + /// + /// 数据结束日期(endDate) + /// + [SugarColumn(IsNullable = true)] + public DateTime? EndDate { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreatedAt { get; set; } = DateTime.Now; + + /// + /// 更新时间 + /// + public DateTime UpdatedAt { get; set; } = DateTime.Now; +}