升级替换部分代码生成功能模板引擎为Jnt

This commit is contained in:
不做码农
2021-11-30 21:33:34 +08:00
parent 33a12c0c53
commit c9ef3ad85c
20 changed files with 310 additions and 418 deletions

View 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}
}
}