基础表2增加默认值
This commit is contained in:
parent
803449bcaa
commit
0a85919d2d
|
@ -10,16 +10,16 @@ namespace Falcon.SugarApi.DatabaseDefinitions
|
||||||
public abstract class SugarBasicTable2
|
public abstract class SugarBasicTable2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 主键
|
/// 主键 默认GUID 382c74c3-721d-4f34-80e5-57657b6cbc27
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
|
[SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
|
||||||
public string Id { get; set; } = "";
|
[MaxLength(36)]
|
||||||
|
public string Id { get; set; } = Guid.NewGuid().ToString();
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
[Required]
|
||||||
[SugarColumn(ColumnDescription = "创建时间")]
|
[SugarColumn(ColumnDescription = "创建时间")]
|
||||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user