完成Model、Dto的代码生成
This commit is contained in:
20
ZR.Admin.WebApi/Template/InputDtoTemplate.txt
Normal file
20
ZR.Admin.WebApi/Template/InputDtoTemplate.txt
Normal 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
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,6 @@ namespace {ModelsNamespace}
|
||||
[SqlSugar.SugarTable("{TableName}")]
|
||||
public class {ModelTypeName}
|
||||
{
|
||||
{ModelContent}
|
||||
{PropertyName}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user