From 803449bcaa9a15f8588c7120357347b38902d340 Mon Sep 17 00:00:00 2001
From: FalconFly <12919280+falconfly@user.noreply.gitee.com>
Date: Wed, 22 Nov 2023 14:30:51 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9F=BA=E7=A1=80=E8=A1=A8Su?=
=?UTF-8?q?garBasicTable2=E5=AE=9A=E4=B9=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../DatabaseDefinitions/SugarBasicTable.cs | 4 +--
.../DatabaseDefinitions/SugarBasicTable2.cs | 25 +++++++++++++++++++
2 files changed, 27 insertions(+), 2 deletions(-)
create mode 100644 Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs
diff --git a/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable.cs b/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable.cs
index 9025505..afe1ea0 100644
--- a/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable.cs
+++ b/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable.cs
@@ -12,13 +12,13 @@ namespace Falcon.SugarApi.DatabaseDefinitions
///
/// 主键
///
- [SugarColumn(IsPrimaryKey = true, ColumnDescription = "主键")]
+ [SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
public Guid Id { get; set; } = Guid.NewGuid();
///
/// 创建时间
///
[Required]
- [SugarColumn(IsOnlyIgnoreUpdate = true, ColumnDescription = "创建时间")]
+ [SugarColumn(IsOnlyIgnoreUpdate = true,ColumnDescription = "创建时间")]
public DateTime CreateTime { get; set; } = DateTime.Now;
///
diff --git a/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs b/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs
new file mode 100644
index 0000000..f96fe12
--- /dev/null
+++ b/Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs
@@ -0,0 +1,25 @@
+using SqlSugar;
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace Falcon.SugarApi.DatabaseDefinitions
+{
+ ///
+ /// 数据表基类
+ ///
+ public abstract class SugarBasicTable2
+ {
+ ///
+ /// 主键
+ ///
+ [SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
+ public string Id { get; set; } = "";
+ ///
+ /// 创建时间
+ ///
+ [Required]
+ [SugarColumn(ColumnDescription = "创建时间")]
+ public DateTime CreateTime { get; set; } = DateTime.Now;
+
+ }
+}