修改模板
parent
fd0d91faa4
commit
084b3d8822
|
@ -67,4 +67,8 @@
|
||||||
<Folder Include="TT_Template\Services_New\" />
|
<Folder Include="TT_Template\Services_New\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.8" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -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; }
|
||||||
<#}#>
|
<#}#>
|
||||||
<#}#>
|
<#}#>
|
||||||
|
|
Loading…
Reference in New Issue