codefirst 测试完毕
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-18 14:51:20 +08:00
parent 5b2b5fead9
commit a64cec987d
20 changed files with 354 additions and 886 deletions
@@ -158,13 +158,10 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL
public class ProjectUser : BaseFullAuditEntity
{
//public string Name2 { get; set; }
//public string OtherName { get; set; }
public string Code { get; set; }
public string Name2 { get; set; }
public string Name { get; set; }
//外键
public Guid ProjectId { get; set; }
@@ -178,20 +175,53 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL
public Guid ProjectId { get; set; }
public Project Project { get; set; }
[Comment("NewCreateName")]
public string NewCreateName { get; set; }
}
#endregion
#region
[Comment("test commment4")]
public class TestStr: BaseFullAuditEntity
{
[Comment("test commment3")]
public string DefualtLength { get; set; }
[Comment("test commment1")]
[MaxLength]
public string MaxLength { get; set; }
[Comment("test commment2")]
[StringLength(400)]
public string DefineLength { get; set;}
}
/// <summary>
/// 备注
/// </summary>
public class TestStr2
{
/// <summary>
/// 备注1
/// </summary>
[StringLength(200)]
public string DefualtLength { get; set; }
/// <summary>
/// 备注1
/// </summary>
[MaxLength]
public string MaxLength { get; set; }
/// <summary>
/// 备注3
/// </summary>
[StringLength(400)]
public string DefineLength { get; set; }
}
#endregion
@@ -220,4 +250,21 @@ namespace IRaCIS.Core.Test.CodeFirstTest.MSSQL
public string Name { get; set; }
}
#endregion
#region
public class TestStrDefaultValue : BaseFullAuditEntity
{
//手动不给默认值
public string Value1 { get; set; }
//手动给默认值
public string Value2 { get; set; } = string.Empty;
//dbfirst 默认生成方式 项目开启了<Nullable>enable</Nullable>
public string Value3 { get; set; } = null!;
}
#endregion
}