using System;
using System.Collections.Generic;
using System.Text;
namespace ZR.Model.System.Generate
{
///
/// 代码生成表
///
[SqlSugar.SugarTable("gen_table")]
[SqlSugar.Tenant("0")]
public class GenTable : SysBase
{
///
/// 表id
///
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int TableId { get; set; }
///
/// 数据库名
///
public string DbName { get; set; }
///
/// 表名
///
public string TableName { get; set; }
///
/// 表描述
///
public string TableComment { get; set; }
///
/// 关联父表的表名
///
public string SubTableName { get; set; }
///
/// 本表关联父表的外键名
///
public string SubTableFkName { get; set; }
///
/// csharp类名
///
public string ClassName { get; set; }
///
/// 使用的模板(crud单表操作 tree树表操作 sub主子表操作)
///
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; }
///
/// 生成代码方式(0zip压缩包 1自定义路径)
///
public string GenType { get; set; }
public string GenPath { get; set; }
///
/// 其他生成选项
///
[SqlSugar.SugarColumn(IsJson = true, ColumnDataType = "nvarchar(4000)")]
public Options Options { get; set; }
#region 表额外字段
/** 表列信息 */
[SqlSugar.SugarColumn(IsIgnore = true)]
public List Columns { get; set; }
///
/// 字表信息
///
[SqlSugar.SugarColumn(IsIgnore = true)]
public GenTable SubTable { get; set; }
#endregion
}
public class Options
{
public long ParentMenuId { get; set; } = 0;
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;
public string PermissionPrefix { get; set; } = string.Empty;
///
/// 额外参数字符串
///
public int[] CheckedBtn { get; set; } = new int[] { 1, 2, 3 };
///
/// 列大小 12,24
///
public int ColNum { get; set; } = 12;
///
/// 是否生成仓储层
///
public int GenerateRepo { get; set; }
}
}