开发代码生成自定义配置编辑
This commit is contained in:
68
ZR.Model/System/Dto/GenTableDto.cs
Normal file
68
ZR.Model/System/Dto/GenTableDto.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using ZR.Model.System.Generate;
|
||||
|
||||
namespace ZR.Model.System.Dto
|
||||
{
|
||||
public class GenTableDto
|
||||
{
|
||||
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 BaseNameSpace { 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; }
|
||||
public List<GenTableColumnDto> Columns { get; set; }
|
||||
}
|
||||
|
||||
public class GenTableColumnDto
|
||||
{
|
||||
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; }
|
||||
///// <summary>
|
||||
///// 是否必填(1是)
|
||||
///// </summary>
|
||||
//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; }
|
||||
///// <summary>
|
||||
///// 显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)
|
||||
///// </summary>
|
||||
public string HtmlType { get; set; }
|
||||
///// <summary>
|
||||
///// 查询类型(等于、不等于、大于、小于、范围)
|
||||
///// </summary>
|
||||
//public string QueryType { get; set; } = "EQ";
|
||||
//public int Sort { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ namespace ZR.Model.System.Generate
|
||||
/// 代码生成表
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("gen_table")]
|
||||
public class GenTable
|
||||
public class GenTable: SysBase
|
||||
{
|
||||
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int TableId { get; set; }
|
||||
@@ -18,7 +18,7 @@ namespace ZR.Model.System.Generate
|
||||
public string SubTableFkName { get; set; }
|
||||
public string ClassName { get; set; }
|
||||
public string TplCategory { get; set; }
|
||||
public string PackageName { get; set; }
|
||||
public string BaseNameSpace { get; set; }
|
||||
public string ModuleName { get; set; }
|
||||
public string BusinessName { get; set; }
|
||||
public string FunctionName { get; set; }
|
||||
@@ -26,9 +26,9 @@ namespace ZR.Model.System.Generate
|
||||
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; }
|
||||
|
||||
/** 表列信息 */
|
||||
[SqlSugar.SugarColumn(IsIgnore = true)]
|
||||
public List<GenTableColumn> Columns { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
@@ -8,19 +9,32 @@ namespace ZR.Model.System.Generate
|
||||
/// 代码生成表字段
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("gen_table_column")]
|
||||
public class GenTableColumn
|
||||
public class GenTableColumn: SysBase
|
||||
{
|
||||
[SqlSugar.SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
|
||||
public int ColumnId { get; set; }
|
||||
public string ColumnName { get; set; }
|
||||
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
|
||||
public int TableId { get; set; }
|
||||
|
||||
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
|
||||
public string TableName { get; set; }
|
||||
public string ColumnComment { get; set; }
|
||||
|
||||
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
|
||||
public string ColumnType { get; set; }
|
||||
public string CsharpType { get; set; }
|
||||
public string CsharpField { get; set; }
|
||||
/// <summary>
|
||||
/// 是否主键(1是)
|
||||
/// </summary>
|
||||
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
|
||||
public bool IsPk { get; set; }
|
||||
/// <summary>
|
||||
/// 是否必填(1是)
|
||||
/// </summary>
|
||||
public bool IsRequired { get; set; }
|
||||
[SqlSugar.SugarColumn(IsOnlyIgnoreUpdate = true)]
|
||||
public bool IsIncrement { get; set; }
|
||||
/// <summary>
|
||||
/// 是否插入
|
||||
@@ -35,9 +49,14 @@ namespace ZR.Model.System.Generate
|
||||
/// </summary>
|
||||
public bool IsList { get; set; }
|
||||
public bool IsQuery { get; set; }
|
||||
/// <summary>
|
||||
/// 显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)
|
||||
/// </summary>
|
||||
public string HtmlType { get; set; }
|
||||
/// <summary>
|
||||
/// 查询类型(等于、不等于、大于、小于、范围)
|
||||
/// </summary>
|
||||
public string QueryType { get; set; } = "EQ";
|
||||
public int Sort { get; set; }
|
||||
|
||||
public string CreateBy { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ namespace ZR.Model.System
|
||||
/// [Computed]计算属性,打上此标签,对象地insert,update等操作会忽略此列
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
//[Computed]
|
||||
[JsonIgnore]
|
||||
public DateTime? BeginTime { get; set; }
|
||||
|
||||
@@ -47,7 +46,6 @@ namespace ZR.Model.System
|
||||
/// 用于搜索使用
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
//[Computed]
|
||||
[JsonIgnore]
|
||||
public DateTime? EndTime { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user