2024-06-07 11:04:26 +08:00
|
|
|
|
namespace ZR.Model.System.Generate
|
2021-09-17 18:19:53 +08:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 代码生成表
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarTable("gen_table", "代码生成表")]
|
|
|
|
|
|
[Tenant("0")]
|
2021-12-01 21:03:27 +08:00
|
|
|
|
public class GenTable : SysBase
|
2021-09-17 18:19:53 +08:00
|
|
|
|
{
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 表id
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
|
|
|
|
|
public long TableId { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
2021-12-14 15:41:58 +08:00
|
|
|
|
/// 数据库名
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 50)]
|
2021-12-14 15:41:58 +08:00
|
|
|
|
public string DbName { get; set; }
|
|
|
|
|
|
/// <summary>
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// 表名
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 150)]
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string TableName { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 表描述
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 150)]
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string TableComment { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 关联父表的表名
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 150)]
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string SubTableName { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 本表关联父表的外键名
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 150)]
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string SubTableFkName { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// csharp类名
|
|
|
|
|
|
/// </summary>
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string ClassName { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 使用的模板(crud单表操作 tree树表操作 sub主子表操作)
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 50, DefaultValue = "crud")]
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string TplCategory { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 基本命名空间前缀
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 100)]
|
2021-09-18 16:10:34 +08:00
|
|
|
|
public string BaseNameSpace { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 生成模块名
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 50)]
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string ModuleName { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 生成业务名
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 50)]
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string BusinessName { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 生成功能名
|
|
|
|
|
|
/// </summary>
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string FunctionName { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 生成作者名
|
|
|
|
|
|
/// </summary>
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string FunctionAuthor { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 生成代码方式(0zip压缩包 1自定义路径)
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 1, DefaultValue = "0")]
|
2021-09-17 18:19:53 +08:00
|
|
|
|
public string GenType { get; set; }
|
2023-06-07 22:28:06 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 代码生成保存路径
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[SugarColumn(Length = 200, DefaultValue = "/")]
|
2022-01-04 22:07:00 +08:00
|
|
|
|
public string GenPath { get; set; }
|
2021-09-27 17:38:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 其他生成选项
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(IsJson = true)]
|
2022-05-22 13:50:27 +08:00
|
|
|
|
public Options Options { get; set; }
|
2022-09-20 21:17:25 +08:00
|
|
|
|
|
2021-11-28 17:40:43 +08:00
|
|
|
|
#region 表额外字段
|
2023-06-07 22:28:06 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 表列信息
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[SugarColumn(IsIgnore = true)]
|
2021-09-18 16:10:34 +08:00
|
|
|
|
public List<GenTableColumn> Columns { get; set; }
|
2021-12-01 21:03:27 +08:00
|
|
|
|
|
2022-05-08 14:08:18 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 字表信息
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(IsIgnore = true)]
|
2022-05-08 14:08:18 +08:00
|
|
|
|
public GenTable SubTable { get; set; }
|
2021-11-28 17:40:43 +08:00
|
|
|
|
#endregion
|
2021-09-17 18:19:53 +08:00
|
|
|
|
}
|
2022-05-22 13:50:27 +08:00
|
|
|
|
|
2022-09-20 21:17:25 +08:00
|
|
|
|
public class Options
|
2022-05-22 13:50:27 +08:00
|
|
|
|
{
|
2023-07-04 21:09:54 +08:00
|
|
|
|
public long ParentMenuId { get; set; }
|
2022-05-22 13:50:27 +08:00
|
|
|
|
public string SortType { get; set; } = "asc";
|
|
|
|
|
|
public string SortField { get; set; } = string.Empty;
|
|
|
|
|
|
public string TreeCode { get; set; } = string.Empty;
|
|
|
|
|
|
public string TreeName { get; set; } = string.Empty;
|
|
|
|
|
|
public string TreeParentCode { get; set; } = string.Empty;
|
2022-09-20 21:17:25 +08:00
|
|
|
|
public string PermissionPrefix { get; set; } = string.Empty;
|
2022-05-22 13:50:27 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 额外参数字符串
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int[] CheckedBtn { get; set; } = new int[] { 1, 2, 3 };
|
2022-05-22 18:07:33 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 列大小 12,24
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int ColNum { get; set; } = 12;
|
2022-09-20 21:17:25 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 是否生成仓储层
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int GenerateRepo { get; set; }
|
2023-06-04 20:38:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 自动生成菜单
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public bool GenerateMenu { get; set; }
|
2023-07-04 21:09:54 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 操作按钮样式
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public int OperBtnStyle { get; set; } = 1;
|
2022-05-22 13:50:27 +08:00
|
|
|
|
}
|
2021-09-17 18:19:53 +08:00
|
|
|
|
}
|