完成Model、Dto的代码生成

This commit is contained in:
izory
2021-09-08 07:48:18 +08:00
parent 85b0305cbc
commit 2d72257945
4 changed files with 127 additions and 92 deletions

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using {ModelsNamespace};
namespace {DtosNamespace}
{
/// <summary>
/// {TableNameDesc}输入对象模型
/// </summary>
public class {ModelTypeName}Dto
{
{PropertyName}
}
public class {ModelTypeName}QueryDto: PagerInfo
{
}
}

View File

@@ -9,6 +9,6 @@ namespace {ModelsNamespace}
[SqlSugar.SugarTable("{TableName}")]
public class {ModelTypeName}
{
{ModelContent}
{PropertyName}
}
}

View File

@@ -57,6 +57,9 @@
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Controller.cs</LastGenOutput>
</None>
<None Update="Template\InputDtoTemplate.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Template\ModelTemplate.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>