开发优化代码生成功能

This commit is contained in:
izory
2021-09-17 18:19:53 +08:00
parent 48acf4b9f7
commit 30e1098a45
17 changed files with 1222 additions and 146 deletions

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System.Generate
{
/// <summary>
/// 代码生成表
/// </summary>
[SqlSugar.SugarTable("gen_table")]
public class GenTable
{
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int TableId { get; set; }
public string TableName { get; set; }
public string TableComment { get; set; }
public string SubTableName { get; set; }
public string SubTableFkName { get; set; }
public string ClassName { get; set; }
public string TplCategory { get; set; }
public string PackageName { get; set; }
public string ModuleName { get; set; }
public string BusinessName { get; set; }
public string FunctionName { get; set; }
public string FunctionAuthor { get; set; }
public string GenType { get; set; }
public string Options { get; set; }
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
public string CreateBy { get; set; }
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
public DateTime CreateTime { get; set; }
}
}

View File

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System.Generate
{
/// <summary>
/// 代码生成表字段
/// </summary>
[SqlSugar.SugarTable("gen_table_column")]
public class GenTableColumn
{
[SqlSugar.SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
public int ColumnId { get; set; }
public string ColumnName { get; set; }
public int TableId { get; set; }
public string TableName { get; set; }
public string ColumnComment { get; set; }
public string ColumnType { get; set; }
public string CsharpType { get; set; }
public string CsharpField { get; set; }
public bool IsPk { get; set; }
public bool IsRequired { get; set; }
public bool IsIncrement { get; set; }
/// <summary>
/// 是否插入
/// </summary>
public bool IsInsert { get; set; }
/// <summary>
/// 是否需要编辑
/// </summary>
public bool IsEdit { get; set; }
/// <summary>
/// isList
/// </summary>
public bool IsList { get; set; }
public bool IsQuery { get; set; }
public int Sort { get; set; }
public string CreateBy { get; set; }
public DateTime CreateTime { get; set; }
}
}