@@ -35,6 +35,7 @@
|
|||||||
usings.Add("System.ComponentModel.DataAnnotations");
|
usings.Add("System.ComponentModel.DataAnnotations");
|
||||||
usings.Add("System.ComponentModel.DataAnnotations.Schema");
|
usings.Add("System.ComponentModel.DataAnnotations.Schema");
|
||||||
usings.Add("Microsoft.EntityFrameworkCore");
|
usings.Add("Microsoft.EntityFrameworkCore");
|
||||||
|
usings.Add("IRaCIS.Core.Domain.Models");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(NamespaceHint))
|
if (!string.IsNullOrEmpty(NamespaceHint))
|
||||||
@@ -62,12 +63,15 @@ namespace <#= NamespaceHint #>;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#>
|
#>
|
||||||
public partial class <#= EntityType.Name #>
|
public partial class <#= EntityType.Name #>: BaseFullAuditEntity
|
||||||
{
|
{
|
||||||
<#
|
<#
|
||||||
var firstProperty = true;
|
var firstProperty = true;
|
||||||
|
var excludedColumns = new[] { "CreateUserId", "Id", "UpdateUserId", "CreateTime", "UpdateTime", "DeleteUserId", "IsDeleted", "DeletedTime" };
|
||||||
foreach (var property in EntityType.GetProperties().OrderBy(p => p.GetColumnOrder() ?? -1))
|
foreach (var property in EntityType.GetProperties().OrderBy(p => p.GetColumnOrder() ?? -1))
|
||||||
{
|
{
|
||||||
|
if (!excludedColumns.Contains(property.Name))
|
||||||
|
{
|
||||||
if (!firstProperty)
|
if (!firstProperty)
|
||||||
{
|
{
|
||||||
WriteLine("");
|
WriteLine("");
|
||||||
@@ -100,6 +104,7 @@ public partial class <#= EntityType.Name #>
|
|||||||
public <#= code.Reference(property.ClrType) #><#= needsNullable ? "?" : "" #> <#= property.Name #> { get; set; }<#= needsInitializer ? " = null!;" : "" #>
|
public <#= code.Reference(property.ClrType) #><#= needsNullable ? "?" : "" #> <#= property.Name #> { get; set; }<#= needsInitializer ? " = null!;" : "" #>
|
||||||
<#
|
<#
|
||||||
firstProperty = false;
|
firstProperty = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var navigation in EntityType.GetNavigations())
|
foreach (var navigation in EntityType.GetNavigations())
|
||||||
|
|||||||
Reference in New Issue
Block a user