增加基础表SugarBasicTable2定义
This commit is contained in:
parent
a9a592463d
commit
803449bcaa
|
@ -12,13 +12,13 @@ namespace Falcon.SugarApi.DatabaseDefinitions
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 主键
|
/// 主键
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(IsPrimaryKey = true, ColumnDescription = "主键")]
|
[SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
|
||||||
public Guid Id { get; set; } = Guid.NewGuid();
|
public Guid Id { get; set; } = Guid.NewGuid();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
[SugarColumn(IsOnlyIgnoreUpdate = true, ColumnDescription = "创建时间")]
|
[SugarColumn(IsOnlyIgnoreUpdate = true,ColumnDescription = "创建时间")]
|
||||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
25
Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs
Normal file
25
Falcon.SugarApi/DatabaseDefinitions/SugarBasicTable2.cs
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Falcon.SugarApi.DatabaseDefinitions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 数据表基类
|
||||||
|
/// </summary>
|
||||||
|
public abstract class SugarBasicTable2
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 主键
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
|
||||||
|
public string Id { get; set; } = "";
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
[SugarColumn(ColumnDescription = "创建时间")]
|
||||||
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user