主键定义改为可空类型,方便客户端上传没有主见的新纪录

This commit is contained in:
FalconFly 2024-01-25 09:38:18 +08:00
parent 1a6eefae43
commit 53895544bd
3 changed files with 3 additions and 3 deletions

View File

@ -11,6 +11,6 @@ namespace Falcon.SugarApi.DatabaseDefinitions
/// 主键 /// 主键
/// </summary> /// </summary>
[SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")] [SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
public Guid Id { get; set; } = Guid.NewGuid(); public Guid? Id { get; set; } = Guid.NewGuid();
} }
} }

View File

@ -11,6 +11,6 @@ namespace Falcon.SugarApi.DatabaseDefinitions
/// 主键 默认GUID 382c74c3-721d-4f34-80e5-57657b6cbc27 /// 主键 默认GUID 382c74c3-721d-4f34-80e5-57657b6cbc27
/// </summary> /// </summary>
[SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")] [SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
public int Id { get; set; } public int? Id { get; set; }
} }
} }

View File

@ -13,6 +13,6 @@ namespace Falcon.SugarApi.DatabaseDefinitions
/// </summary> /// </summary>
[SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")] [SugarColumn(IsPrimaryKey = true,ColumnDescription = "主键")]
[MaxLength(36)] [MaxLength(36)]
public string Id { get; set; } public string? Id { get; set; }
} }
} }