feat: 添加 TiingoTicker 股票代码字典实体
This commit is contained in:
parent
647fde9219
commit
7a808a1465
@ -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)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
62
AssetManager.Data/TiingoTicker.cs
Normal file
62
AssetManager.Data/TiingoTicker.cs
Normal 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;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user