升级替换部分代码生成功能模板引擎为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

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
using ZR.Model.System.Generate;
namespace ZR.CodeGenerator.Model
@@ -10,24 +6,16 @@ namespace ZR.CodeGenerator.Model
public class GenerateDto
{
public long TableId { get; set; }
//public string[] QueryColumn { get; set; }
/// <summary>
/// 是否预览代码
/// </summary>
public int IsPreview { get; set; }
/// <summary>
/// 要生成的文件
/// </summary>
public int[] GenCodeFiles { get; set; }
/// <summary>
/// 如果目标文件存在是否覆盖。默认为false
/// </summary>
public bool Coverd { get; set; } = true;
/// <summary>
/// 生成代码的数据库类型 0、mysql 1、sqlserver
/// </summary>
public int DbType { get; set; }
public GenTable GenTable { get; set; }
public CodeGenerateOption GenOptions { get; set; }
#region
/// <summary>
/// 代码模板预览存储路径存放

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZR.Model.System.Generate;
namespace ZR.CodeGenerator.Model
{
@@ -38,14 +39,14 @@ namespace ZR.CodeGenerator.Model
public string InsertColumn { get; set; }
/// <summary>
/// 实体属性模板
/// </summary>
public string ModelProperty { get; set; }
/// <summary>
/// 输入Dto模板
/// </summary>
public string InputDtoProperty { get; set; }
///// <summary>
///// 实体属性模板
///// </summary>
//public string ModelProperty { get; set; }
///// <summary>
///// 输入Dto模板
///// </summary>
//public string InputDtoProperty { get; set; }
//vue、api
public string VueViewFormResetHtml { get; set; }
@@ -73,10 +74,10 @@ namespace ZR.CodeGenerator.Model
/// 查询条件
/// </summary>
public string QueryCondition { get; set; } = "";
/// <summary>
/// 查询属性
/// </summary>
public string QueryProperty { get; set; }
///// <summary>
///// 查询属性
///// </summary>
//public string QueryProperty { get; set; }
/// <summary>
/// vue data内容
/// </summary>
@@ -105,7 +106,7 @@ namespace ZR.CodeGenerator.Model
/// 上传URL data
/// </summary>
public string VueUploadUrl { get; set; }
public bool UploadImage{ get; set; }
//public bool UploadImage{ get; set; }
public string Author { get; set; }
public string AddTime { get; set; } = DateTime.Now.ToString("yyyy-MM-dd");
}