feat:代码生成新增字段导出设置
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using SqlSugar;
|
||||
$if(replaceDto.ShowBtnExport)
|
||||
using OfficeOpenXml.Attributes;
|
||||
$end
|
||||
|
||||
namespace ${options.ModelsNamespace}.Models
|
||||
{
|
||||
@@ -17,10 +18,14 @@ namespace ${options.ModelsNamespace}.Models
|
||||
$foreach(item in genTable.Columns)
|
||||
/// <summary>
|
||||
/// 描述 :${item.ColumnComment} ${item.Remark}
|
||||
/// 空值 :$if(item.IsRequired == "True") false $else true $end
|
||||
/// 空值 :$if(item.IsRequired == "True")false${else}true${end}
|
||||
/// </summary>
|
||||
$if(replaceDto.ShowBtnExport)
|
||||
$if(item.IsExport)
|
||||
[EpplusTableColumn(Header = "$if(item.ColumnComment == "")${item.CsharpField}${else}${item.ColumnComment}${end}"$if(item.CsharpType == "DateTime"), NumberFormat = "yyyy-MM-dd HH:mm:ss"$end)]
|
||||
$else
|
||||
[EpplusIgnore]
|
||||
$end
|
||||
$end
|
||||
$if(item.IsPk || item.IsIncrement)
|
||||
[SugarColumn(IsPrimaryKey = ${item.IsPk.ToString().ToLower()}, IsIdentity = ${item.IsIncrement.ToString().ToLower()}$if(item.CsharpField.ToLower() != item.ColumnName.ToLower()), ColumnName = "$item.ColumnName"$end)]
|
||||
|
||||
Reference in New Issue
Block a user