From 0a85919d2db2289dc7ad7bf11329b85be563c4c8 Mon Sep 17 00:00:00 2001
From: FalconFly <12919280+falconfly@user.noreply.gitee.com>
Date: Fri, 24 Nov 2023 17:42:34 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E8=A1=A82=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs b/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs
index f96fe12..67a708a 100644
--- a/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs
+++ b/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs
@@ -10,16 +10,16 @@ namespace Falcon.SugarApi.DatabaseDefinitions
public abstract class SugarBasicTable2
{
///
- /// 主键
+ /// 主键 默认GUID 382c74c3-721d-4f34-80e5-57657b6cbc27
///
[SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
- public string Id { get; set; } = "";
+ [MaxLength(36)]
+ public string Id { get; set; } = Guid.NewGuid().ToString();
///
/// 创建时间
///
[Required]
[SugarColumn(ColumnDescription = "创建时间")]
public DateTime CreateTime { get; set; } = DateTime.Now;
-
}
}