From ebdc70481905eec9511f6f9f4bb3f104afa91082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=99=BE=E7=90=83?= Date: Fri, 6 Mar 2026 09:23:42 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20TiingoTicker=20CreatedAt/UpdatedAt=20?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=8F=AF=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AssetManager.Data/TiingoTicker.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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; } }