基础表2增加默认值

This commit is contained in:
FalconFly 2023-11-24 17:42:34 +08:00
parent 803449bcaa
commit 0a85919d2d

View File

@ -10,16 +10,16 @@ namespace Falcon.SugarApi.DatabaseDefinitions
public abstract class SugarBasicTable2
{
/// <summary>
/// 主键
/// 主键 默认GUID 382c74c3-721d-4f34-80e5-57657b6cbc27
/// </summary>
[SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
public string Id { get; set; } = "";
[MaxLength(36)]
public string Id { get; set; } = Guid.NewGuid().ToString();
/// <summary>
/// 创建时间
/// </summary>
[Required]
[SugarColumn(ColumnDescription = "创建时间")]
public DateTime CreateTime { get; set; } = DateTime.Now;
}
}