|
|
|
@ -39,17 +39,18 @@ using IRaCIS.Core.Domain.Share;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
using System.ComponentModel;
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace IRaCIS.Core.Domain.Models
|
|
|
|
namespace IRaCIS.Core.Domain.Models
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
[Description("备注: <#=tableName#>")]
|
|
|
|
[Comment("<#=tableName#>")]
|
|
|
|
[Table("<#=tableName#>")]
|
|
|
|
[Table("<#=tableName#>")]
|
|
|
|
public class <#=tableName#> : BaseFullAuditEntity
|
|
|
|
public class <#=tableName#> : BaseFullAuditEntity
|
|
|
|
{
|
|
|
|
{
|
|
|
|
<# var excludedColumns = new[] { "CreateUserId", "Id", "UpdateUserId", "CreateTime", "UpdateTime", "DeleteUserId", "IsDeleted", "DeletedTime" };#>
|
|
|
|
<# var excludedColumns = new[] { "CreateUserId", "Id", "UpdateUserId", "CreateTime", "UpdateTime", "DeleteUserId", "IsDeleted", "DeletedTime" };#>
|
|
|
|
<# foreach(DbColumn column in DbHelper.GetDbColumns(config.ConnectionString, config.DbDatabase, tableName)){ #>
|
|
|
|
<# foreach(DbColumn column in DbHelper.GetDbColumns(config.ConnectionString, config.DbDatabase, tableName)){ #>
|
|
|
|
<# if (!excludedColumns.Contains(column.ColumnName)){ #>
|
|
|
|
<# if (!excludedColumns.Contains(column.ColumnName)){ #>
|
|
|
|
[Description("<#= column.Remark == "" ? "" : column.Remark.Replace("\r\n"," ") #>")]
|
|
|
|
[Comment("<#= column.Remark == "" ? "" : column.Remark.Replace("\r\n"," ") #>")]
|
|
|
|
public <#= column.CSharpType#><# if(column.CommonType.IsValueType && column.IsNullable){#>?<#}#> <#=column.ColumnName#> { get; set; }
|
|
|
|
public <#= column.CSharpType#><# if(column.CommonType.IsValueType && column.IsNullable){#>?<#}#> <#=column.ColumnName#> { get; set; }
|
|
|
|
<#}#>
|
|
|
|
<#}#>
|
|
|
|
<#}#>
|
|
|
|
<#}#>
|
|
|
|
|