diff --git a/AssetManager.Data/TiingoTicker.cs b/AssetManager.Data/TiingoTicker.cs index 255c349..29e5278 100644 --- a/AssetManager.Data/TiingoTicker.cs +++ b/AssetManager.Data/TiingoTicker.cs @@ -9,7 +9,7 @@ namespace AssetManager.Data; public class TiingoTicker { /// - /// 主键 ID + /// 主键 ID(自增,导入时忽略此字段) /// [SugarColumn(IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } @@ -51,12 +51,14 @@ public class TiingoTicker public DateTime? EndDate { get; set; } /// - /// 创建时间 + /// 创建时间(导入时可空,数据库会自动设置) /// - public DateTime CreatedAt { get; set; } = DateTime.Now; + [SugarColumn(IsNullable = true)] + public DateTime? CreatedAt { get; set; } /// - /// 更新时间 + /// 更新时间(导入时可空,数据库会自动设置) /// - public DateTime UpdatedAt { get; set; } = DateTime.Now; + [SugarColumn(IsNullable = true)] + public DateTime? UpdatedAt { get; set; } }