feat: 添加 TiingoTicker 股票代码字典实体

This commit is contained in:
虾球 2026-03-06 08:40:00 +00:00
parent 647fde9219
commit 7a808a1465
2 changed files with 64 additions and 1 deletions

View File

@ -18,7 +18,8 @@ public class DatabaseService
typeof(Strategy), typeof(Strategy),
typeof(Portfolio), typeof(Portfolio),
typeof(Position), typeof(Position),
typeof(Transaction) typeof(Transaction),
typeof(TiingoTicker)
); );
} }

View File

@ -0,0 +1,62 @@
using SqlSugar;
namespace AssetManager.Data;
/// <summary>
/// Tiingo 股票代码字典表
/// </summary>
[SugarTable("tiingo_tickers")]
public class TiingoTicker
{
/// <summary>
/// 主键 ID
/// </summary>
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
/// <summary>
/// 标的代码ticker
/// </summary>
[SugarColumn(ColumnDataType = "varchar(50)")]
public string? Ticker { get; set; }
/// <summary>
/// 交易所exchange
/// </summary>
[SugarColumn(ColumnDataType = "varchar(50)")]
public string? Exchange { get; set; }
/// <summary>
/// 资产类型assetType
/// </summary>
[SugarColumn(ColumnDataType = "varchar(50)")]
public string? AssetType { get; set; }
/// <summary>
/// 计价货币priceCurrency
/// </summary>
[SugarColumn(ColumnDataType = "varchar(10)")]
public string? PriceCurrency { get; set; }
/// <summary>
/// 数据开始日期startDate
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? StartDate { get; set; }
/// <summary>
/// 数据结束日期endDate
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? EndDate { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreatedAt { get; set; } = DateTime.Now;
/// <summary>
/// 更新时间
/// </summary>
public DateTime UpdatedAt { get; set; } = DateTime.Now;
}