升级替换部分代码生成功能模板引擎为Jnt
This commit is contained in:
27
ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt
Normal file
27
ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplModel.txt
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SqlSugar;
|
||||
|
||||
namespace ${options.ModelsNamespace}.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// ${genTable.FunctionName},数据实体对象
|
||||
///
|
||||
/// @author ${replaceDto.Author}
|
||||
/// @date ${replaceDto.AddTime}
|
||||
/// </summary>
|
||||
[SugarTable("${replaceDto.TableName}")]
|
||||
public class ${replaceDto.ModelTypeName}
|
||||
{
|
||||
$foreach(item in genTable.Columns)
|
||||
/// <summary>
|
||||
/// 描述 : ${item.ColumnComment}
|
||||
/// 空值 :$if(item.IsRequired == "True") false $else true $end
|
||||
/// </summary>
|
||||
$if(item.IsPk || item.IsIncrement)
|
||||
[SqlSugar.SugarColumn(IsPrimaryKey = ${item.IsPk.ToString().ToLower()}, IsIdentity = ${item.IsIncrement.ToString().ToLower()})]
|
||||
$end
|
||||
public $item.CsharpType$item.RequiredStr $item.CsharpField { get; set; }
|
||||
${end}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user