😎同步新版的代码生成
This commit is contained in:
parent
012867a4ee
commit
c5a87e9292
@ -7,15 +7,15 @@
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义规范化结果特性
|
||||
/// 代码生成策略特性
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = true)]
|
||||
public class CustomUnifyResultAttribute : Attribute
|
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
|
||||
public class CodeGenStrategyAttribute : Attribute
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public CodeGenSceneEnum Scene { get; }
|
||||
|
||||
public CustomUnifyResultAttribute(string name)
|
||||
public CodeGenStrategyAttribute(CodeGenSceneEnum scene)
|
||||
{
|
||||
Name = name;
|
||||
Scene = scene;
|
||||
}
|
||||
}
|
||||
@ -1,92 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 通用接口参数验证特性类
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class CommonValidationAttribute : ValidationAttribute
|
||||
{
|
||||
private readonly Dictionary<string, string> _conditions;
|
||||
private static readonly Dictionary<string, Delegate> CompiledConditions = [];
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <param name="conditionPairs">条件对参数,长度必须为偶数<br/>
|
||||
/// 奇数字符串参数:动态条件<br/>
|
||||
/// 偶数字符串参数:提示消息
|
||||
/// </param>
|
||||
/// <example>
|
||||
/// <code lang="C">
|
||||
/// public class ModelInput {
|
||||
///
|
||||
///
|
||||
/// public string A { get; set; }
|
||||
///
|
||||
///
|
||||
/// [CommonValidation(
|
||||
/// "A == 1 <value>&&</value> B == null", "当 A == 1时,B不能为空",
|
||||
/// "C == 2 <value>&&</value> B == null", "当 C == 2时,B不能为空"
|
||||
/// )]
|
||||
/// public string B { get; set; }
|
||||
/// }
|
||||
/// </code>
|
||||
/// </example>
|
||||
public CommonValidationAttribute(params string[] conditionPairs)
|
||||
{
|
||||
if (conditionPairs.Length % 2 != 0) throw new ArgumentException("条件对必须以偶数个字符串的形式提供。");
|
||||
|
||||
var conditions = new Dictionary<string, string>();
|
||||
for (int i = 0; i < conditionPairs.Length; i += 2)
|
||||
conditions.Add(conditionPairs[i], conditionPairs[i + 1]);
|
||||
|
||||
_conditions = conditions;
|
||||
}
|
||||
|
||||
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
|
||||
{
|
||||
foreach (var (expr, errorMessage) in _conditions)
|
||||
{
|
||||
var conditionKey = $"{validationContext.ObjectType.FullName}.{expr}";
|
||||
if (!CompiledConditions.TryGetValue(conditionKey, out var condition))
|
||||
{
|
||||
condition = CreateCondition(validationContext.ObjectType, expr);
|
||||
CompiledConditions[conditionKey] = condition;
|
||||
}
|
||||
|
||||
if ((bool)condition.DynamicInvoke(validationContext.ObjectInstance)!)
|
||||
{
|
||||
return new ValidationResult(errorMessage ?? $"[{validationContext.MemberName}]校验失败");
|
||||
}
|
||||
}
|
||||
|
||||
return ValidationResult.Success;
|
||||
}
|
||||
|
||||
private Delegate CreateCondition(Type modelType, string expression)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 创建参数表达式
|
||||
var parameter = Expression.Parameter(typeof(object), "x");
|
||||
|
||||
// 构建 Lambda 表达式
|
||||
var lambda = DynamicExpressionParser.ParseLambda([Expression.Parameter(modelType, "x")], typeof(bool), expression);
|
||||
|
||||
// 创建新的 Lambda 表达式,接受 object 参数并调用编译后的表达式
|
||||
var invokeExpression = Expression.Invoke(lambda, Expression.Convert(parameter, modelType));
|
||||
var finalLambda = Expression.Lambda<Func<object, bool>>(invokeExpression, parameter);
|
||||
|
||||
return finalLambda.Compile();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new ArgumentException($"无法解析表达式 '{expression}': {ex.Message}", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -125,7 +125,7 @@ public class DictAttribute : ValidationAttribute, ITransient
|
||||
/// </summary>
|
||||
protected override ValidationResult IsValid(object? value, ValidationContext validationContext)
|
||||
{
|
||||
return IsValidAsync(value, validationContext, CancellationToken.None).GetAwaiter().GetResult();
|
||||
return IsValidAsync(value, validationContext, CancellationToken.None).ConfigureAwait(false).GetAwaiter().GetResult();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
26
Admin.NET/Admin.NET.Core/CodeGen/CodeGenStrategyFactory.cs
Normal file
26
Admin.NET/Admin.NET.Core/CodeGen/CodeGenStrategyFactory.cs
Normal file
@ -0,0 +1,26 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成策略工厂
|
||||
/// </summary>
|
||||
public class CodeGenStrategyFactory : IScoped
|
||||
{
|
||||
private readonly Dictionary<(Type, CodeGenSceneEnum), ICodeGenStrategy> _strategyMap;
|
||||
|
||||
public CodeGenStrategyFactory(IEnumerable<ICodeGenStrategy> strategies)
|
||||
{
|
||||
_strategyMap = strategies.ToDictionary(s => (s.GetType().BaseType!.GenericTypeArguments.First(), s.GetType().GetCustomAttribute<CodeGenStrategyAttribute>()!.Scene), s => s);
|
||||
}
|
||||
|
||||
public CodeGenStrategy<T> GetStrategy<T>(CodeGenSceneEnum scene)
|
||||
{
|
||||
if (_strategyMap.TryGetValue((typeof(T), scene), out var strategy)) return (CodeGenStrategy<T>)strategy;
|
||||
throw Oops.Oh(ErrorCodeEnum.D1400, scene.GetDescription());
|
||||
}
|
||||
}
|
||||
240
Admin.NET/Admin.NET.Core/CodeGen/Engines/CustomTemplateEngine.cs
Normal file
240
Admin.NET/Admin.NET.Core/CodeGen/Engines/CustomTemplateEngine.cs
Normal file
@ -0,0 +1,240 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义模板引擎
|
||||
/// </summary>
|
||||
public class CustomTemplateEngine : ViewEngineModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 场景
|
||||
/// </summary>
|
||||
public int Scene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作者
|
||||
/// </summary>
|
||||
public string AuthorName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 邮箱
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
public string ModuleName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 命名空间
|
||||
/// </summary>
|
||||
public string NameSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目最后名称
|
||||
/// </summary>
|
||||
public string ProjectLastName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 前端页面目录名
|
||||
/// </summary>
|
||||
public string PagePath { get; set; } = "main";
|
||||
|
||||
/// <summary>
|
||||
/// 打印模板类型
|
||||
/// </summary>
|
||||
public string PrintType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义打印模板名
|
||||
/// </summary>
|
||||
public string PrintName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用Swagger接口
|
||||
/// </summary>
|
||||
public bool IsApiService { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库定位器
|
||||
/// </summary>
|
||||
public string ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主表类名
|
||||
/// </summary>
|
||||
public string ClassName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 首字母小写主表类名
|
||||
/// </summary>
|
||||
public string LowerClassName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务名
|
||||
/// </summary>
|
||||
public string BusName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否有状态字段
|
||||
/// </summary>
|
||||
public bool HasStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否有上传字段
|
||||
/// </summary>
|
||||
public bool HasUpload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否有关联表
|
||||
/// </summary>
|
||||
public bool HasJoinTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否只有Id单主键
|
||||
/// </summary>
|
||||
public bool IsOnlyIdPrimary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上级联表字段
|
||||
/// </summary>
|
||||
public string? LastLinkPropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下级联表字段
|
||||
/// </summary>
|
||||
public string? NextLinkPropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 树组件配置
|
||||
/// </summary>
|
||||
public TreeWithTableConfigInput TreeConfig { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是横向布局
|
||||
/// </summary>
|
||||
public bool IsHorizontal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对照目标表配置
|
||||
/// </summary>
|
||||
public TableRelationshipConfigInput RelationshipTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 从表配置
|
||||
/// </summary>
|
||||
public CustomTemplateEngine SlaveTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所有字段集
|
||||
/// </summary>
|
||||
public List<CodeGenColumnConfig> AllFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询字段集
|
||||
/// </summary>
|
||||
public List<CodeGenColumnConfig> QueryFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表格字段集
|
||||
/// </summary>
|
||||
public List<CodeGenColumnConfig> TableFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导入导出字段集
|
||||
/// </summary>
|
||||
public List<CodeGenColumnConfig> ImportFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主键字段集
|
||||
/// </summary>
|
||||
public List<CodeGenColumnConfig> PrimaryFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 增改字段集
|
||||
/// </summary>
|
||||
public List<CodeGenColumnConfig> AddUpdateFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传字段集
|
||||
/// </summary>
|
||||
public List<CodeGenColumnConfig> UploadFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下拉框字段集
|
||||
/// </summary>
|
||||
public List<CodeGenColumnConfig> DropdownFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 接口字段集
|
||||
/// </summary>
|
||||
public List<CodeGenColumnConfig> ApiFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库字段集
|
||||
/// </summary>
|
||||
public List<ColumnOutput> ColumnList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取首字母小写文本
|
||||
/// </summary>
|
||||
/// <param name="text"></param>
|
||||
/// <returns></returns>
|
||||
public string GetFirstLower(string text) => text?.ToFirstLetterLowerCase();
|
||||
|
||||
/// <summary>
|
||||
/// 根据.NET类型获取TypeScript类型
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public string GetTypeScriptType(string type) => CodeGenHelper.GetTypeScriptType(type);
|
||||
|
||||
/// <summary>
|
||||
/// 格式化主键查询条件
|
||||
/// 例: PrimaryKeysFormat(" || ", "u.{0} == input.{0}")
|
||||
/// 单主键返回 u.Id == input.Id
|
||||
/// 组合主键返回 u.Id == input.Id || u.FkId == input.FkId
|
||||
/// </summary>
|
||||
/// <param name="separator">分隔符</param>
|
||||
/// <param name="format">模板字符串</param>
|
||||
/// <param name="lowerFirstLetter">字段首字母小写</param>
|
||||
/// <returns></returns>
|
||||
public string PrimaryKeysFormat(string separator, string format, bool lowerFirstLetter = false) => string.Join(separator, PrimaryFields.Select(u => string.Format(format, lowerFirstLetter ? u.LowerPropertyName : u.PropertyName)));
|
||||
|
||||
/// <summary>
|
||||
/// 根据配置获取前端HttpApi方法名
|
||||
/// </summary>
|
||||
/// <param name="column"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="engine"></param>
|
||||
/// <returns></returns>
|
||||
public string GetHttpApiMethodName(CodeGenColumnConfig column, string type, CustomTemplateEngine engine = null)
|
||||
{
|
||||
engine ??= this;
|
||||
var entityName = SlaveTable != null && SlaveTable.ApiFields.Any(u => u == column) ? SlaveTable.ClassName : engine.ClassName;
|
||||
var suffixName = type switch
|
||||
{
|
||||
"page" => IsApiService ? "PagePost" : type, // 分页查询
|
||||
"update" => IsApiService ? "UpdatePost" : type, // 更新记录
|
||||
"add" => IsApiService ? "AddPost" : type, // 新增记录
|
||||
"detail" => IsApiService ? "DetailGet" : type, // 详情
|
||||
"delete" => IsApiService ? "DeletePost" : type, // 删除
|
||||
"batchDelete" => IsApiService ? "BatchDeletePost" : type, // 批量删除
|
||||
"setStatus" => IsApiService ? "SetStatusPost" : type, // 设置状态
|
||||
"exportData" => IsApiService ? "ExportPost" : type, // 数据导出
|
||||
"importData" => IsApiService ? "ImportPostForm" : type, // 数据导入
|
||||
"downloadTemplate" => IsApiService ? "ImportGet" : type, // 下载模板
|
||||
"fkTable" => IsApiService ? $"{column.JoinConfig.EntityName}PagePost" : "page", // 外键
|
||||
"fkTree" => IsApiService ? $"{column.JoinConfig.EntityName}TreePost" : $"get{column.JoinConfig.EntityName}Tree", // 树
|
||||
"upload" => IsApiService ? $"Upload{column?.PropertyName}PostForm" : $"upload{column?.PropertyName}", // 上传
|
||||
_ => throw new Exception("未知接口类型")
|
||||
};
|
||||
return IsApiService ? $"getAPI({entityName}Api).api{entityName}{suffixName}" : $"{GetFirstLower(entityName)}Api.{suffixName}";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
public class TableEntityEngine : ViewEngineModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 作者
|
||||
/// </summary>
|
||||
public string AuthorName { get; set; } = "喵你个汪呀";
|
||||
|
||||
/// <summary>
|
||||
/// 邮箱
|
||||
/// </summary>
|
||||
public string Email { get; set; } = "jason-dom@qq.com";
|
||||
|
||||
/// <summary>
|
||||
/// 命名空间
|
||||
/// </summary>
|
||||
public string NameSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库配置Id
|
||||
/// </summary>
|
||||
public string ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表名
|
||||
/// </summary>
|
||||
public string TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体名
|
||||
/// </summary>
|
||||
public string EntityName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表描述
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基类名
|
||||
/// </summary>
|
||||
public string BaseClassName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段集合
|
||||
/// </summary>
|
||||
public List<DbColumnInfo> TableFields { get; set; }
|
||||
}
|
||||
@ -4,45 +4,37 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 验证规则选项
|
||||
/// </summary>
|
||||
public class VerifyRuleItem
|
||||
public class TableSeedDataEngine : ViewEngineModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// 作者
|
||||
/// </summary>
|
||||
public long Key { get; set; }
|
||||
public string AuthorName { get; set; } = "喵你个汪呀";
|
||||
|
||||
/// <summary>
|
||||
/// 验证类型
|
||||
/// 邮箱
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
public string Email { get; set; } = "jason-dom@qq.com";
|
||||
|
||||
/// <summary>
|
||||
/// 验证错误消息
|
||||
/// 命名空间
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
public string NameSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// 实体名
|
||||
/// </summary>
|
||||
public string Min { get; set; }
|
||||
public string EntityName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string Max { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 正则表达式
|
||||
/// 记录列表
|
||||
/// </summary>
|
||||
public string Pattern { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据类型(搭配正则)
|
||||
/// </summary>
|
||||
public string DataType { get; set; }
|
||||
public List<string> RecordList { get; set; }
|
||||
}
|
||||
263
Admin.NET/Admin.NET.Core/CodeGen/Models/CodeGenColumnConfig.cs
Normal file
263
Admin.NET/Admin.NET.Core/CodeGen/Models/CodeGenColumnConfig.cs
Normal file
@ -0,0 +1,263 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成详细配置参数
|
||||
/// </summary>
|
||||
public class CodeGenColumnConfig : SysCodeGenColumn
|
||||
{
|
||||
/// <summary>
|
||||
/// 首字母小写的属性名
|
||||
/// </summary>
|
||||
public string LowerPropertyName => PropertyName[..1].ToLower() + PropertyName[1..];
|
||||
|
||||
/// <summary>
|
||||
/// 是否字典字段
|
||||
/// </summary>
|
||||
public bool IsDict => EffectType is CodeGenEffectTypeEnum.DictSelector;
|
||||
|
||||
/// <summary>
|
||||
/// 是否枚举字段
|
||||
/// </summary>
|
||||
public bool IsEnum => EffectType is CodeGenEffectTypeEnum.EnumSelector;
|
||||
|
||||
/// <summary>
|
||||
/// 是否常量字段
|
||||
/// </summary>
|
||||
public bool IsConst => EffectType is CodeGenEffectTypeEnum.ConstSelector;
|
||||
|
||||
/// <summary>
|
||||
/// 是否上传字段
|
||||
/// </summary>
|
||||
public bool IsUpload => EffectType is CodeGenEffectTypeEnum.Upload;
|
||||
|
||||
/// <summary>
|
||||
/// 是否开关字段
|
||||
/// </summary>
|
||||
public bool IsSwitch => EffectType is CodeGenEffectTypeEnum.Switch;
|
||||
|
||||
/// <summary>
|
||||
/// 是否输入框字段
|
||||
/// </summary>
|
||||
public bool IsInput => EffectType is CodeGenEffectTypeEnum.Input;
|
||||
|
||||
/// <summary>
|
||||
/// 是否数字输入框字段
|
||||
/// </summary>
|
||||
public bool IsInputNumber => EffectType is CodeGenEffectTypeEnum.InputNumber;
|
||||
|
||||
/// <summary>
|
||||
/// 是否文本域字段
|
||||
/// </summary>
|
||||
public bool IsInputTextArea => EffectType is CodeGenEffectTypeEnum.InputTextArea;
|
||||
|
||||
/// <summary>
|
||||
/// 是否时间选择器字段
|
||||
/// </summary>
|
||||
public bool IsDatePicker => EffectType is CodeGenEffectTypeEnum.DatePicker;
|
||||
|
||||
/// <summary>
|
||||
/// 是否外键字段
|
||||
/// </summary>
|
||||
public bool IsForeignKey => EffectType is CodeGenEffectTypeEnum.ForeignKey;
|
||||
|
||||
/// <summary>
|
||||
/// 是否树字段
|
||||
/// </summary>
|
||||
public bool IsTree => EffectType is CodeGenEffectTypeEnum.ApiTreeSelector;
|
||||
|
||||
/// <summary>
|
||||
/// 是否多选字段
|
||||
/// </summary>
|
||||
public bool Multiple => JoinConfig?.Multiple ?? false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否唯一字段
|
||||
/// </summary>
|
||||
public bool IsUnique => FromValid == CodeGenFromRuleValidEnum.Unique;
|
||||
|
||||
/// <summary>
|
||||
/// 状态字段
|
||||
/// </summary>
|
||||
public bool IsStatus => PropertyName == nameof(BaseStatusInput.Status) && DictConfig.Code.Trim('?') == nameof(StatusEnum);
|
||||
|
||||
/// <summary>
|
||||
/// 是否要联表
|
||||
/// </summary>
|
||||
public bool HasJoinTable => EffectType is CodeGenEffectTypeEnum.Upload or CodeGenEffectTypeEnum.ForeignKey or CodeGenEffectTypeEnum.ApiTreeSelector;
|
||||
|
||||
/// <summary>
|
||||
/// 是否要插槽
|
||||
/// </summary>
|
||||
public bool HasSlots => !(IsConst || IsInput || IsInputNumber || IsInputTextArea) || IsCopy;
|
||||
|
||||
/// <summary>
|
||||
/// 连表别名
|
||||
/// </summary>
|
||||
public string LeftJoinAliasName => Regex.Replace(LowerPropertyName, "Id$", "");
|
||||
|
||||
/// <summary>
|
||||
/// 字典配置
|
||||
/// </summary>
|
||||
public EffectFileConfigInput FileConfig => !string.IsNullOrWhiteSpace(Config) ? JSON.Deserialize<EffectFileConfigInput>(Config) : null;
|
||||
|
||||
/// <summary>
|
||||
/// 字典配置
|
||||
/// </summary>
|
||||
public EffectDictConfigInput DictConfig => !string.IsNullOrWhiteSpace(Config) ? JSON.Deserialize<EffectDictConfigInput>(Config) : null;
|
||||
|
||||
/// <summary>
|
||||
/// 联表配置
|
||||
/// </summary>
|
||||
public EffectTreeConfigInput JoinConfig => !string.IsNullOrWhiteSpace(Config) ? JSON.Deserialize<EffectTreeConfigInput>(Config) : null;
|
||||
|
||||
/// <summary>
|
||||
/// 时间控件配置
|
||||
/// </summary>
|
||||
public EffectDatePickerConfigInput DateConfig => !string.IsNullOrWhiteSpace(Config) ? JSON.Deserialize<EffectDatePickerConfigInput>(Config) : null;
|
||||
|
||||
/// <summary>
|
||||
/// 获取可空类型
|
||||
/// </summary>
|
||||
public string NullableNetType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsEnum) return DictConfig.Multiple || NetType.StartsWith("string") ? "string" : $"{DictConfig.Code}?";
|
||||
if (NetType.StartsWith("string")) return "string";
|
||||
if (NetType.StartsWith("Guid")) return "Guid";
|
||||
return NetType.EndsWith("?") ? NetType : NetType + "?";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取字段验证特性
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetFromValidAttribute()
|
||||
{
|
||||
bool isCustomValid = FromValid is CodeGenFromRuleValidEnum.IDCard or CodeGenFromRuleValidEnum.Range or CodeGenFromRuleValidEnum.MaxLength or CodeGenFromRuleValidEnum.Unique;
|
||||
if (isCustomValid)
|
||||
{
|
||||
switch (FromValid)
|
||||
{
|
||||
case CodeGenFromRuleValidEnum.Unique: return null;
|
||||
case CodeGenFromRuleValidEnum.IDCard:
|
||||
if (!NetType.StartsWith("string")) return null;
|
||||
return "[IdCardNo]";
|
||||
|
||||
case CodeGenFromRuleValidEnum.MaxLength:
|
||||
if (!NetType.StartsWith("string") || ColumnLength <= 0) return null;
|
||||
return $"[MaxLength({ColumnLength}, ErrorMessage = \"{ColumnComment}不能超过{ColumnLength}个字符\")]";
|
||||
|
||||
case CodeGenFromRuleValidEnum.Range:
|
||||
return $"[Range(0, 100, ErrorMessage = \"{ColumnComment}范围不正确\")]";
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return $"[DataValidation(ValidationTypes.{FromValid.ToString()}, ErrorMessage = \"{ColumnComment}不正确\")]";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示字段
|
||||
/// </summary>
|
||||
public string DisplayPropertyNames
|
||||
{
|
||||
get
|
||||
{
|
||||
var expList = JoinConfig?.DisplayPropertyNames?.Split(",").Select(u => $"{LeftJoinAliasName}.{u}");
|
||||
if (expList?.Count() == 1) return expList.FirstOrDefault();
|
||||
if (expList == null) return null;
|
||||
return $"$\"{{{expList.Join("}-{")}}}\"";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 连表属性名称
|
||||
/// </summary>
|
||||
public string LeftJoinPropertyName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!HasJoinTable) throw Oops.Bah("不是连表字段");
|
||||
return EffectType switch
|
||||
{
|
||||
CodeGenEffectTypeEnum.ForeignKey or CodeGenEffectTypeEnum.ApiTreeSelector => Regex.Replace(PropertyName, "Id([s]?)$", "$1") + JoinConfig?.DisplayPropertyNames?.Split(",").FirstOrDefault(),
|
||||
CodeGenEffectTypeEnum.Upload => Regex.Replace(PropertyName, "Id([s]?)$", "$1") + "Attachment",
|
||||
_ => null
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取列格式化配置方法
|
||||
/// </summary>
|
||||
public string GetVxeColumnExtraConfig
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!HasSlots) return "";
|
||||
if (IsCopy) return ", slots: { default: '$row_copy' }"; // 复制字段
|
||||
if (IsStatistical) return ", slots: { default: '$row_statistical' }"; // 统计字段
|
||||
switch (EffectType)
|
||||
{
|
||||
case CodeGenEffectTypeEnum.Switch: // 开关
|
||||
return ", slots: { default: '$row_switch' }";
|
||||
|
||||
case CodeGenEffectTypeEnum.ApiTreeSelector: // 树组件
|
||||
case CodeGenEffectTypeEnum.ForeignKey: // 外键
|
||||
return $", formatter: ({{ row }}) => row.{LeftJoinPropertyName.ToFirstLetterLowerCase()}";
|
||||
|
||||
case CodeGenEffectTypeEnum.DatePicker: // 时间选择器
|
||||
return $", formatter: ({{ cellValue, row }}) => commonFun.dateFormat{GetDateReaderName(DateConfig.Format)}([], 0, cellValue)";
|
||||
|
||||
case CodeGenEffectTypeEnum.Upload: // 上传
|
||||
return $", params: {{ attachmentName: '{LeftJoinAliasName.ToFirstLetterLowerCase()}', isImage: {FileConfig.IsImage.ToString().ToLower()}, useDownload: {FileConfig.UseDownload.ToString().ToLower()}, downloadText: '{FileConfig.DownloadText}' }}" +
|
||||
", slots: { default: '$row_upload' }";
|
||||
|
||||
case CodeGenEffectTypeEnum.ConstSelector: // 常量选择器
|
||||
case CodeGenEffectTypeEnum.DictSelector: // 字典选择器
|
||||
case CodeGenEffectTypeEnum.EnumSelector: // 枚举选择器
|
||||
if (IsStatus) return ", slots: { default: '$row_status' }"; // 状态字段
|
||||
return $", params: {{ code: '{DictConfig.Code}', multiple: {DictConfig.Multiple.ToString().ToLower()}, isConst: {IsConst.ToString().ToLower()} }}" +
|
||||
", slots: { default: '$row_sysDict' }";
|
||||
}
|
||||
return "";
|
||||
string GetDateReaderName(string format) => format switch
|
||||
{
|
||||
"date" => "YMD",
|
||||
"time" => "HMS",
|
||||
_ => "YMDHMS"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取表单验证规则
|
||||
/// </summary>
|
||||
public string GetFormRules
|
||||
{
|
||||
get
|
||||
{
|
||||
var result = "";
|
||||
var trigger = IsDatePicker || IsDict || IsEnum || IsTree ? "change" : "blur";
|
||||
if (IsRequired) result += $" :rules=\"[{{required: true, message: '请选择{ColumnComment}', trigger: '{trigger}'}}]\"";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取外键显示值语句
|
||||
/// </summary>
|
||||
/// <param name="tableAlias">表别名</param>
|
||||
/// <param name="separator">多字段时的连接符</param>
|
||||
/// <returns></returns>
|
||||
public string GetDisplayColumn(string tableAlias, string separator = "-") => "$\"" + string.Join(separator, DisplayPropertyNames?.Split(",").Select(name => $"{{{tableAlias}.{name}}}") ?? new List<string>()) + "\"";
|
||||
}
|
||||
@ -4,28 +4,30 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 表唯一配置项
|
||||
/// 模板输出上下文
|
||||
/// </summary>
|
||||
public class TableUniqueConfigItem
|
||||
public class TemplateContextOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 字段列表
|
||||
/// 文件名
|
||||
/// </summary>
|
||||
public List<string> Columns { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述信息
|
||||
/// 模板类型
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 格式化查询条件
|
||||
/// 输出路径
|
||||
/// </summary>
|
||||
/// <param name="separator">分隔符</param>
|
||||
/// <param name="format">模板字符串</param>
|
||||
/// <returns></returns>
|
||||
public string Format(string separator, string format) => string.Join(separator, Columns.Select(name => string.Format(format, name)));
|
||||
public string OutPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 内容
|
||||
/// </summary>
|
||||
public string Context { get; set; }
|
||||
}
|
||||
@ -1,20 +1,15 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 系统流水号类型枚举
|
||||
/// 种子数据策略基类(处理TableSeedDataEngine类型)
|
||||
/// </summary>
|
||||
[Description("系统流水号类型枚举")]
|
||||
public enum SerialTypeEnum
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public abstract class CodeGenEntityStrategyBase<T> : CodeGenStrategy<T>
|
||||
{
|
||||
/// <summary>
|
||||
/// 其他
|
||||
/// </summary>
|
||||
[Description("其他")]
|
||||
Other = 999,
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 基础策略接口
|
||||
/// </summary>
|
||||
public interface ICodeGenStrategy
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 泛型策略接口
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public abstract class CodeGenStrategy<T> : ICodeGenStrategy
|
||||
{
|
||||
protected DbConnectionOptions _dbConnectionOption => App.GetOptions<DbConnectionOptions>();
|
||||
protected CodeGenOptions _codeGenOption => App.GetOptions<CodeGenOptions>();
|
||||
protected ISqlSugarClient _db => App.GetRequiredService<ISqlSugarClient>();
|
||||
protected IViewEngine _viewEngine => App.GetRequiredService<IViewEngine>();
|
||||
|
||||
public abstract Task<List<TemplateContextOutput>> GenerateCode(T input);
|
||||
|
||||
/// <summary>
|
||||
/// 渲染模板
|
||||
/// </summary>
|
||||
/// <param name="template">模板上下文</param>
|
||||
/// <param name="action">渲染动作</param>
|
||||
/// <returns></returns>
|
||||
protected async Task<TemplateContextOutput> RenderAsync(TemplateContextOutput template, Func<string, Action<IViewEngineOptionsBuilder>, string> action)
|
||||
{
|
||||
try
|
||||
{
|
||||
var nameSpace = this.GetType().Namespace;
|
||||
string content = await File.ReadAllTextAsync(Path.Combine(Path.Combine(App.WebHostEnvironment.WebRootPath, "template"), template.Name));
|
||||
template.Context = action.Invoke(content, builder =>
|
||||
{
|
||||
builder.AddAssemblyReferenceByName("System.Text.RegularExpressions");
|
||||
builder.AddAssemblyReferenceByName("System.Collections");
|
||||
builder.AddAssemblyReferenceByName("System.Linq");
|
||||
builder.AddUsing("System.Text.RegularExpressions");
|
||||
builder.AddUsing("System.Collections.Generic");
|
||||
builder.AddUsing("System.Linq");
|
||||
builder.AddUsing(nameSpace);
|
||||
});
|
||||
template.Name = template.Name.Replace(".vm", "");
|
||||
return template;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception($"模板渲染失败:{template.Name}", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,153 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 表策略基类(处理SysCodeGen类型)
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public abstract class CodeGenTableStrategyBase<T> : CodeGenStrategy<T> where T : SysCodeGen
|
||||
{
|
||||
protected IViewEngine ViewEngine => App.GetRequiredService<IViewEngine>();
|
||||
protected CodeGenOptions CodeGenOption => App.GetOptions<CodeGenOptions>();
|
||||
|
||||
/// <summary>
|
||||
/// 模板上下文列表
|
||||
/// </summary>
|
||||
protected static List<TemplateContextOutput> TemplateList => new()
|
||||
{
|
||||
new() { Type = 900, Name = "web_api.ts.vm", OutPath = "api/{PagePath}/{ModuleNameLower}.ts" },
|
||||
new() { Type = 1000, Name = "web_views_index.vue.vm", OutPath = "views/{PagePath}/{ModuleNameLower}/index.vue" },
|
||||
new() { Type = 1010, Name = "web_views_editDialog.vue.vm", OutPath = "views/{PagePath}/{ModuleNameLower}/component/edit{ModuleName}Dialog.vue" },
|
||||
new() { Type = 1020, Name = "web_views_Tree.vue.vm", OutPath = "views/{PagePath}/{ModuleNameLower}/component/{LowerTreeEntityName}Tree.vue" },
|
||||
|
||||
new() { Type = 2000, Name = "service_Service.cs.vm", OutPath = "Service/{ModuleName}/{ModuleName}Service.cs" },
|
||||
new() { Type = 2010, Name = "service_OutputDto.cs.vm", OutPath = "Service/{ModuleName}/Dto/{ModuleName}Output.cs" },
|
||||
new() { Type = 2020, Name = "service_InputDto.cs.vm", OutPath = "Service/{ModuleName}/Dto/{ModuleName}Input.cs" },
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// 根据生成方式获取模板路径列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected List<TemplateContextOutput> GetTemplateList(SysCodeGen codeGen)
|
||||
{
|
||||
var templateList = codeGen.GenerateMethod switch
|
||||
{
|
||||
CodeGenMethodEnum.DownloadZipFrontend or CodeGenMethodEnum.GenerateToProjectFrontend => TemplateList.Where(u => u.Type < 2000).ToList(),
|
||||
CodeGenMethodEnum.DownloadZipBackend or CodeGenMethodEnum.GenerateToProjectBackend => TemplateList.Where(u => u.Type >= 2000).ToList(),
|
||||
_ => TemplateList
|
||||
};
|
||||
// 传统接口模式去掉 web_api 模板
|
||||
if (codeGen.IsApiService) templateList = templateList.Where(e => e.Type != 900).ToList();
|
||||
// 非树组件场景去掉树组件模板
|
||||
if (codeGen.Scene.ToInt() % 100 != 10) templateList = templateList.Where(e => e.Type != 1020).ToList();
|
||||
return templateList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 处理模板输出路径
|
||||
/// </summary>
|
||||
/// <param name="template"></param>
|
||||
/// <param name="codeGen"></param>
|
||||
protected void ReplaceTemplateOutput(TemplateContextOutput template, SysCodeGen codeGen)
|
||||
{
|
||||
// 处理模板输出路径
|
||||
string outputPath = Path.Combine(App.WebHostEnvironment.WebRootPath, "codeGen", codeGen.ModuleName);
|
||||
template.OutPath = template.OutPath.Replace("{PagePath}", codeGen.PagePath)
|
||||
.Replace("{ModuleName}", codeGen.ModuleName)
|
||||
.Replace("{ModuleNameLower}", codeGen.ModuleName.ToFirstLetterLowerCase())
|
||||
.Replace("{LowerTreeEntityName}", codeGen.TreeConfig?.EntityName.ToFirstLetterLowerCase());
|
||||
|
||||
// 替换从表模板输出路径占位符
|
||||
if (codeGen.TableList.Count > 1) template.OutPath = template.OutPath.Replace("{SlaveModuleName}", codeGen.TableList.Skip(1).First().ModuleName);
|
||||
|
||||
string tempPath;
|
||||
if ((int)codeGen.GenerateMethod < 200)
|
||||
{
|
||||
// 下载模式下的路径处理
|
||||
tempPath = !template.OutPath.EndsWith(".cs")
|
||||
? Path.Combine(outputPath, CodeGenOption.FrontRootPath, "src")
|
||||
: Path.Combine(outputPath, codeGen.NameSpace);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 生成到本项目下的路径处理
|
||||
tempPath = !template.OutPath.EndsWith(".cs")
|
||||
? Path.Combine(new DirectoryInfo(App.WebHostEnvironment.ContentRootPath).Parent!.Parent!.FullName, CodeGenOption.FrontRootPath, "src")
|
||||
: Path.Combine(new DirectoryInfo(App.WebHostEnvironment.ContentRootPath).Parent!.FullName, codeGen.NameSpace!);
|
||||
}
|
||||
template.OutPath = Path.Combine(tempPath, template.OutPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量渲染模板
|
||||
/// </summary>
|
||||
/// <param name="codeGen"></param>
|
||||
/// <param name="templateList"></param>
|
||||
/// <param name="engine"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task<List<TemplateContextOutput>> RenderList(SysCodeGen codeGen, List<TemplateContextOutput> templateList, CustomTemplateEngine engine)
|
||||
{
|
||||
void SetEnginePropertyValue(CustomTemplateEngine input)
|
||||
{
|
||||
input.ModuleName ??= codeGen.ModuleName; // 模块名称
|
||||
input.BusName ??= codeGen.BusName; // 业务名
|
||||
input.AuthorName ??= codeGen.AuthorName; // 作者
|
||||
input.Email ??= codeGen.Email; // 作者邮箱
|
||||
input.NameSpace = codeGen.NameSpace; // 命名空间
|
||||
input.PagePath = codeGen.PagePath; // 页面目录
|
||||
input.Scene = codeGen.Scene.ToInt(); // 场景
|
||||
input.ProjectLastName = codeGen.NameSpace!.Split('.').Last(); // 项目最后个名称,生成的时候赋值
|
||||
input.IsApiService = codeGen.IsApiService; // 是否使用 Api Service
|
||||
input.PrintType = codeGen.PrintType.ToString(); // 支持打印类型
|
||||
input.PrintName = codeGen.PrintName; // 打印模板名称
|
||||
input.LastLinkPropertyName ??= input.LastLinkPropertyName; // 上级关联字段
|
||||
input.NextLinkPropertyName ??= input.NextLinkPropertyName; // 下级关联字段
|
||||
input.IsHorizontal = codeGen.IsHorizontal;
|
||||
|
||||
input.QueryFields = input.AllFields.Where(e => e.IsQuery).ToList(); // 查询字段列表
|
||||
input.TableFields = input.AllFields.Where(e => e.IsTable).ToList(); // 表格字段列表
|
||||
input.ImportFields = input.AllFields.Where(e => e.IsImport).ToList(); // 导入导出字段列表
|
||||
input.PrimaryFields = input.AllFields.Where(e => e.IsPrimarykey).ToList(); // 主键字段列表
|
||||
input.AddUpdateFields = input.AllFields.Where(e => e.IsAddUpdate).ToList(); // 增改字段列表
|
||||
input.UploadFields = input.AllFields.Where(e => e.EffectType == CodeGenEffectTypeEnum.Upload).ToList(); // 上传文件字段列表
|
||||
input.DropdownFields = input.AllFields.Where(e => e.EffectType is CodeGenEffectTypeEnum.ApiTreeSelector or CodeGenEffectTypeEnum.ForeignKey or CodeGenEffectTypeEnum.DictSelector or CodeGenEffectTypeEnum.EnumSelector).ToList(); // 选择类字段列表
|
||||
var map = new Dictionary<string, int>();
|
||||
input.ApiFields = input.AllFields.Where(e => e.IsTree || e.IsForeignKey).Where(e => map.TryAdd(e.JoinConfig.EntityName + e.IsTree, 1)).ToList();
|
||||
|
||||
// input.ColumnList = await CodeGenColumnService.GetColumnList(new BaseIdInput{ Id = codeGen.TableList.First().Id }); // 数据库字段列表,
|
||||
input.IsOnlyIdPrimary = input.AllFields.Where(u => u.IsPrimarykey).All(u => u.PropertyName == "Id"); // 是否主键只有Id
|
||||
input.HasStatus = input.AllFields.Any(u => u.PropertyName == nameof(BaseStatusInput.Status) && u.DictConfig.Code.Trim('?') == nameof(StatusEnum)); // 是否有启用禁用字段
|
||||
input.HasJoinTable = input.AllFields.Any(e => e.EffectType is CodeGenEffectTypeEnum.ForeignKey or CodeGenEffectTypeEnum.ApiTreeSelector); // 是否有联表
|
||||
input.HasUpload = input.UploadFields.Count != 0; // 是否有上传
|
||||
|
||||
// 校验模板参数
|
||||
input.Validate();
|
||||
|
||||
// 必须有主键
|
||||
if (!input.PrimaryFields.Any()) throw Oops.Oh(ErrorCodeEnum.D1405);
|
||||
}
|
||||
|
||||
// 设置主表参数
|
||||
SetEnginePropertyValue(engine);
|
||||
|
||||
// 设置从表参数
|
||||
if (engine.SlaveTable != null) SetEnginePropertyValue(engine.SlaveTable);
|
||||
|
||||
// 异步渲染模板
|
||||
var tasks = templateList.Select(template => Task.Run(() => RenderAsync(template, (context, builder) => _viewEngine.RunCompile(context, engine, builder)))).ToList();
|
||||
await Task.WhenAll(tasks);
|
||||
|
||||
// 获取结果集
|
||||
var result = new List<TemplateContextOutput>();
|
||||
foreach (var task in tasks) result.Add(await task);
|
||||
|
||||
// 处理输出路径
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 表实体代码生成策略类
|
||||
/// </summary>
|
||||
[CodeGenStrategy(CodeGenSceneEnum.TableEntity)]
|
||||
public class TableEntityCodeGenStrategy : CodeGenEntityStrategyBase<CreateEntityInput>, ISingleton
|
||||
{
|
||||
private readonly TemplateContextOutput _template = new() { Name = "Entity.cs.vm", OutPath = "Entity/{ModuleName}.cs" };
|
||||
|
||||
public override async Task<List<TemplateContextOutput>> GenerateCode(CreateEntityInput input)
|
||||
{
|
||||
var config = _dbConnectionOption.ConnectionConfigs.FirstOrDefault(u => u.ConfigId.ToString() == input.ConfigId) ?? throw Oops.Oh(ErrorCodeEnum.db1004);
|
||||
input.EntityName = string.IsNullOrWhiteSpace(input.EntityName) ? (config.DbSettings.EnableUnderLine ? CodeGenHelper.CamelColumnName(input.TableName, null) : input.TableName) : input.EntityName;
|
||||
input.Position = string.IsNullOrWhiteSpace(input.Position) ? "X.Application" : input.Position;
|
||||
|
||||
// Entity.cs.vm中是允许创建没有基类的实体的,所以这里也要做出相同的判断
|
||||
string[] dbColumnNames = [];
|
||||
if (!string.IsNullOrWhiteSpace(input.BaseClassName))
|
||||
{
|
||||
_codeGenOption.EntityBaseColumn.TryGetValue(input.BaseClassName, out dbColumnNames);
|
||||
if (dbColumnNames is null or { Length: 0 }) throw Oops.Oh("基类配置文件不存在此类型");
|
||||
}
|
||||
|
||||
var db = _db.AsTenant().GetConnectionScope(input.ConfigId);
|
||||
var dbColumnInfos = db.DbMaintenance.GetColumnInfosByTableName(input.TableName, false);
|
||||
dbColumnInfos.ForEach(u =>
|
||||
{
|
||||
u.PropertyName = config.DbSettings.EnableUnderLine ? CodeGenHelper.CamelColumnName(u.DbColumnName, dbColumnNames) : u.DbColumnName; // 转下划线后的列名需要再转回来
|
||||
u.DataType = CodeGenHelper.ConvertDataType(u, config.DbType);
|
||||
});
|
||||
if (_codeGenOption.BaseEntityNames.Contains(input.BaseClassName, StringComparer.OrdinalIgnoreCase))
|
||||
dbColumnInfos = dbColumnInfos.Where(u => !dbColumnNames.Contains(u.PropertyName, StringComparer.OrdinalIgnoreCase)).ToList();
|
||||
|
||||
var dbTableInfo = db.DbMaintenance.GetTableInfoList(false).FirstOrDefault(u => u.Name == input.TableName || u.Name == input.TableName.ToLower()) ?? throw Oops.Oh(ErrorCodeEnum.db1001);
|
||||
|
||||
var engine = new TableEntityEngine
|
||||
{
|
||||
NameSpace = $"{input.Position}.Entity",
|
||||
TableName = input.TableName,
|
||||
EntityName = input.EntityName,
|
||||
BaseClassName = string.IsNullOrWhiteSpace(input.BaseClassName) ? "" : $": {input.BaseClassName}",
|
||||
ConfigId = input.ConfigId,
|
||||
Description = string.IsNullOrWhiteSpace(dbTableInfo.Description)
|
||||
? input.EntityName + "业务表"
|
||||
: dbTableInfo.Description,
|
||||
TableFields = dbColumnInfos
|
||||
};
|
||||
|
||||
var result = await RenderAsync(_template, (context, builder) => _viewEngine.RunCompile(context, engine, builder));
|
||||
result.OutPath = Path.Combine(Path.Combine(new DirectoryInfo(App.WebHostEnvironment.ContentRootPath).Parent!.FullName, input.Position), result.OutPath.Replace("{ModuleName}", input.EntityName));
|
||||
return [result];
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,176 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 表种子数据代码生成策略类
|
||||
/// </summary>
|
||||
[CodeGenStrategy(CodeGenSceneEnum.TableSeedData)]
|
||||
public class TableSeedDataCodeGenStrategy : CodeGenEntityStrategyBase<CreateSeedDataInput>, ISingleton
|
||||
{
|
||||
private readonly TemplateContextOutput _template = new() { Name = "SeedData.cs.vm", OutPath = "SeedData/{ModuleName}SeedData.cs" };
|
||||
|
||||
public override async Task<List<TemplateContextOutput>> GenerateCode(CreateSeedDataInput input)
|
||||
{
|
||||
var config = _dbConnectionOption.ConnectionConfigs.FirstOrDefault(u => u.ConfigId.ToString() == input.ConfigId) ?? throw Oops.Oh(ErrorCodeEnum.db1004);
|
||||
input.Position = string.IsNullOrWhiteSpace(input.Position) ? "X.Core" : input.Position;
|
||||
|
||||
var db = _db.AsTenant().GetConnectionScope(input.ConfigId);
|
||||
var tableInfo = db.DbMaintenance.GetTableInfoList(false).First(u => u.Name == input.TableName); // 表名
|
||||
List<DbColumnInfo> dbColumnInfos = db.DbMaintenance.GetColumnInfosByTableName(input.TableName, false); // 所有字段
|
||||
IEnumerable<EntityInfo> entityInfos = await GetEntityInfos();
|
||||
Type entityType = null;
|
||||
foreach (var item in entityInfos)
|
||||
{
|
||||
if (tableInfo.Name.ToLower() != (config.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(item.DbTableName) : item.DbTableName).ToLower()) continue;
|
||||
entityType = item.Type;
|
||||
break;
|
||||
}
|
||||
if (entityType == null) throw Oops.Oh(ErrorCodeEnum.db1003);
|
||||
|
||||
input.EntityName = entityType.Name;
|
||||
input.SeedDataName = entityType.Name + "SeedData";
|
||||
if (!string.IsNullOrWhiteSpace(input.Suffix)) input.SeedDataName += input.Suffix;
|
||||
|
||||
// 查询所有数据
|
||||
var query = db.QueryableByObject(entityType);
|
||||
|
||||
// 优先用创建时间排序
|
||||
DbColumnInfo orderField = dbColumnInfos.FirstOrDefault(u => u.DbColumnName.ToLower() is "create_time" or "createtime");
|
||||
if (orderField != null) query = query.OrderBy(orderField.DbColumnName);
|
||||
|
||||
// 优先用创建时间排序,再使用第一个主键排序
|
||||
if (dbColumnInfos.Any(u => u.IsPrimarykey))
|
||||
query = query.OrderBy(dbColumnInfos.First(u => u.IsPrimarykey).DbColumnName);
|
||||
var records = ((IEnumerable)await query.ToListAsync()).ToDynamicList();
|
||||
|
||||
// 过滤已存在的数据
|
||||
if (input.FilterExistingData && records.Any())
|
||||
{
|
||||
// 获取实体类型-所有种数据数据类型
|
||||
var entityTypes = App.EffectiveTypes.Where(u => u.FullName != null && !u.IsInterface && !u.IsAbstract && u.IsClass && u.IsDefined(typeof(SugarTable), false) && u.FullName.EndsWith("." + input.EntityName))
|
||||
.Where(u => !u.GetCustomAttributes<IgnoreTableAttribute>().Any())
|
||||
.ToList();
|
||||
if (entityTypes.Count == 1) // 只有一个实体匹配才能过滤
|
||||
{
|
||||
// 获取实体的主键对应的属性名称
|
||||
var pkInfo = entityTypes[0].GetProperties().FirstOrDefault(u => u.GetCustomAttribute<SugarColumn>()?.IsPrimaryKey == true);
|
||||
if (pkInfo != null)
|
||||
{
|
||||
var seedDataTypes = App.EffectiveTypes.Where(u => !u.IsInterface && !u.IsAbstract && u.IsClass && u.GetInterfaces()
|
||||
.Any(i => i.HasImplementedRawGeneric(typeof(ISqlSugarEntitySeedData<>)) && i.GenericTypeArguments[0] == entityTypes[0])).ToList();
|
||||
// 可能会重名的种子数据不作为过滤项
|
||||
string doNotFilterFullName1 = $"{input.Position}.SeedData.{input.SeedDataName}";
|
||||
string doNotFilterFullName2 = $"{input.Position}.{input.SeedDataName}"; // Core中的命名空间没有SeedData
|
||||
|
||||
PropertyInfo idPropertySeedData = records[0].GetType().GetProperty("Id");
|
||||
for (int i = seedDataTypes.Count - 1; i >= 0; i--)
|
||||
{
|
||||
string fullName = seedDataTypes[i].FullName;
|
||||
if ((fullName == doNotFilterFullName1) || (fullName == doNotFilterFullName2)) continue;
|
||||
|
||||
// 删除重复数据
|
||||
var instance = Activator.CreateInstance(seedDataTypes[i]);
|
||||
var hasDataMethod = seedDataTypes[i].GetMethod("HasData");
|
||||
var seedData = ((IEnumerable)hasDataMethod?.Invoke(instance, null))?.Cast<object>();
|
||||
if (seedData == null) continue;
|
||||
|
||||
List<object> recordsToRemove = new();
|
||||
foreach (var record in records)
|
||||
{
|
||||
object recordId = pkInfo.GetValue(record);
|
||||
if (seedData.Select(d1 => idPropertySeedData.GetValue(d1)).Any(dataId => recordId != null && dataId != null && recordId.Equals(dataId))) recordsToRemove.Add(record);
|
||||
}
|
||||
foreach (var itemToRemove in recordsToRemove) records.Remove(itemToRemove);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取所有字段信息
|
||||
var propertyList = entityType.GetProperties().Where(x => false == (x.GetCustomAttribute<SugarColumn>()?.IsIgnore ?? false)).ToList();
|
||||
for (var i = 0; i < propertyList.Count; i++)
|
||||
{
|
||||
if (propertyList[i].Name != nameof(EntityBaseId.Id) || !(propertyList[i].GetCustomAttribute<SugarColumn>()?.IsPrimaryKey ?? true)) continue;
|
||||
var temp = propertyList[i];
|
||||
for (var j = i; j > 0; j--) propertyList[j] = propertyList[j - 1];
|
||||
propertyList[0] = temp;
|
||||
}
|
||||
|
||||
// 拼接种子数据
|
||||
var recordList = records.Select(obj => string.Join(", ", propertyList.Select(prop =>
|
||||
{
|
||||
var propType = Nullable.GetUnderlyingType(prop.PropertyType) ?? prop.PropertyType;
|
||||
object value = prop.GetValue(obj);
|
||||
if (value == null) value = "null";
|
||||
else if (propType == typeof(string))
|
||||
{
|
||||
value = (value as string)?.Replace("\"", "\"\"");
|
||||
value = $"@\"{value}\"";
|
||||
}
|
||||
else if (propType.IsEnum)
|
||||
{
|
||||
value = $"{propType.Name}.{value}";
|
||||
}
|
||||
else if (propType == typeof(bool))
|
||||
{
|
||||
value = (bool)value ? "true" : "false";
|
||||
}
|
||||
else if (propType == typeof(DateTime))
|
||||
{
|
||||
value = $"DateTime.Parse(\"{((DateTime)value):yyyy-MM-dd HH:mm:ss.fff}\")";
|
||||
}
|
||||
return $"{prop.Name}={value}";
|
||||
}))).ToList();
|
||||
|
||||
var engine = new TableSeedDataEngine
|
||||
{
|
||||
NameSpace = $"{input.Position}.SeedData",
|
||||
EntityName = input.EntityName,
|
||||
Description = tableInfo.Description,
|
||||
RecordList = recordList
|
||||
};
|
||||
var result = await RenderAsync(_template.DeepCopy(), (context, builder) => _viewEngine.RunCompile(context, engine, builder));
|
||||
result.OutPath = Path.Combine(Path.Combine(new DirectoryInfo(App.WebHostEnvironment.ContentRootPath).Parent!.FullName, input.Position), result.OutPath.Replace("{ModuleName}", input.EntityName));
|
||||
return [result];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取库表信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task<IEnumerable<EntityInfo>> GetEntityInfos()
|
||||
{
|
||||
var type = typeof(SugarTable);
|
||||
var types = new List<Type>();
|
||||
var entityInfos = new List<EntityInfo>();
|
||||
if (_codeGenOption.EntityAssemblyNames != null)
|
||||
foreach (var asm in _codeGenOption.EntityAssemblyNames.Select(Assembly.Load))
|
||||
types.AddRange(asm.GetExportedTypes().ToList());
|
||||
|
||||
Type[] cosType = types.Where(u => IsMyAttribute(Attribute.GetCustomAttributes(u, true))).ToArray();
|
||||
foreach (var c in cosType)
|
||||
{
|
||||
var sugarAttribute = c.GetCustomAttributes(type, true).FirstOrDefault();
|
||||
var des = c.GetCustomAttributes(typeof(DescriptionAttribute), true);
|
||||
var description = des.Length > 0 ? ((DescriptionAttribute)des[0]).Description : "";
|
||||
entityInfos.Add(new EntityInfo
|
||||
{
|
||||
EntityName = c.Name,
|
||||
DbTableName = sugarAttribute == null ? c.Name : ((SugarTable)sugarAttribute).TableName,
|
||||
TableDescription = description,
|
||||
Type = c
|
||||
});
|
||||
}
|
||||
return await Task.FromResult(entityInfos);
|
||||
|
||||
bool IsMyAttribute(Attribute[] o)
|
||||
{
|
||||
return o.Any(a => a.GetType() == type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 主从表代码生成策略类
|
||||
/// </summary>
|
||||
[CodeGenStrategy(CodeGenSceneEnum.MasterSlaveTables)]
|
||||
public class MasterSlaveTablesCodeGenStrategy : CodeGenTableStrategyBase<SysCodeGen>, ISingleton
|
||||
{
|
||||
public override async Task<List<TemplateContextOutput>> GenerateCode(SysCodeGen input)
|
||||
{
|
||||
var mainTableInfo = input.TableList.FirstOrDefault() ?? throw Oops.Oh(ErrorCodeEnum.D1401);
|
||||
var columnList = mainTableInfo.ColumnList.Adapt<List<CodeGenColumnConfig>>();
|
||||
|
||||
var slaveTableInfo = input.TableList.Skip(1).FirstOrDefault() ?? throw Oops.Oh(ErrorCodeEnum.D1401);
|
||||
var slaveColumnList = slaveTableInfo.ColumnList.Adapt<List<CodeGenColumnConfig>>();
|
||||
|
||||
// 创建视图引擎数据
|
||||
var engine = new CustomTemplateEngine
|
||||
{
|
||||
PagePath = input.PagePath, // 前端目录
|
||||
NameSpace = input.NameSpace, // 命名空间
|
||||
ClassName = mainTableInfo.EntityName, // 类名称
|
||||
ModuleName = mainTableInfo.EntityName, // 模块名称
|
||||
TreeConfig = input.TreeConfig, // 树组件配置
|
||||
LastLinkPropertyName = mainTableInfo.LastLinkPropertyName, // 上级联表字段
|
||||
NextLinkPropertyName = mainTableInfo.NextLinkPropertyName, // 下级联表字段
|
||||
LowerClassName = mainTableInfo.EntityName[..1].ToLower() + mainTableInfo.EntityName[1..], // 首字母小写的类名称
|
||||
ConfigId = mainTableInfo.ConfigId, // 库定位器名
|
||||
AllFields = columnList, // 所有字段集
|
||||
|
||||
SlaveTable = new CustomTemplateEngine
|
||||
{
|
||||
PagePath = input.PagePath, // 前端目录
|
||||
NameSpace = input.NameSpace, // 命名空间
|
||||
BusName = slaveTableInfo.BusName,
|
||||
ClassName = slaveTableInfo.EntityName, // 类名称
|
||||
ModuleName = slaveTableInfo.EntityName, // 模块名称
|
||||
LastLinkPropertyName = slaveTableInfo.LastLinkPropertyName, // 上级联表字段
|
||||
NextLinkPropertyName = slaveTableInfo.NextLinkPropertyName, // 下级联表字段
|
||||
LowerClassName = slaveTableInfo.EntityName[..1].ToLower() + slaveTableInfo.EntityName[1..], // 首字母小写的类名称
|
||||
ConfigId = slaveTableInfo.ConfigId, // 库定位器名
|
||||
AllFields = slaveColumnList, // 所有字段集
|
||||
},
|
||||
};
|
||||
|
||||
// 获取模板列表
|
||||
var templateList = GetTemplateList(input);
|
||||
|
||||
// 处理模板输出路径
|
||||
templateList.ForEach(e => ReplaceTemplateOutput(e, input));
|
||||
|
||||
// 渲染模板
|
||||
var result = await RenderList(input, templateList, engine);
|
||||
|
||||
// 渲染从表编辑组件
|
||||
var slaveTemplate = GetTemplateList(input).First(u => u.Type == 1010);
|
||||
result.AddRange(await RenderList(input, [slaveTemplate], engine.SlaveTable));
|
||||
slaveTemplate.Name = slaveTemplate.Name.Replace("editDialog", "slave_editDialog");
|
||||
slaveTemplate.OutPath = slaveTemplate.OutPath.Replace("{ModuleName}", "{SlaveModuleName}");
|
||||
ReplaceTemplateOutput(slaveTemplate, input);
|
||||
|
||||
// 如果需要生成从表接口服务
|
||||
templateList = GetTemplateList(input).Where(u => u.Type >= 2000).ToList();
|
||||
templateList.ForEach(e =>
|
||||
{
|
||||
e.OutPath = e.OutPath.Replace("{ModuleName}", "{SlaveModuleName}");
|
||||
ReplaceTemplateOutput(e, input);
|
||||
});
|
||||
var slaveResult = await RenderList(input, templateList, engine.SlaveTable);
|
||||
slaveResult.ForEach(u => u.Name = u.Name.Replace("service_", "service_slave_"));
|
||||
result.AddRange(slaveResult);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 单表代码生成策略类
|
||||
/// </summary>
|
||||
[CodeGenStrategy(CodeGenSceneEnum.SingleTable)]
|
||||
public class SingleTableCodeGenStrategy : CodeGenTableStrategyBase<SysCodeGen>, ISingleton
|
||||
{
|
||||
public override async Task<List<TemplateContextOutput>> GenerateCode(SysCodeGen input)
|
||||
{
|
||||
var tableInfo = input.TableList.FirstOrDefault() ?? throw Oops.Oh(ErrorCodeEnum.D1401);
|
||||
var columnList = tableInfo.ColumnList.Adapt<List<CodeGenColumnConfig>>();
|
||||
|
||||
// 创建视图引擎数据
|
||||
var engine = new CustomTemplateEngine
|
||||
{
|
||||
PagePath = input.PagePath, // 前端目录
|
||||
NameSpace = input.NameSpace, // 命名空间
|
||||
ClassName = tableInfo.EntityName, // 类名称
|
||||
ModuleName = tableInfo.EntityName, // 模块名称
|
||||
LowerClassName = tableInfo.EntityName[..1].ToLower() + tableInfo.EntityName[1..], // 首字母小写的类名称
|
||||
TreeConfig = input.TreeConfig, // 树组件配置
|
||||
ConfigId = tableInfo.ConfigId, // 库定位器名
|
||||
AllFields = columnList, // 所有字段集
|
||||
LastLinkPropertyName = tableInfo.LastLinkPropertyName, // 上级关联字段名
|
||||
NextLinkPropertyName = tableInfo.NextLinkPropertyName, // 下级关联字段名
|
||||
};
|
||||
|
||||
// 获取模板列表
|
||||
var templateList = GetTemplateList(input);
|
||||
|
||||
// 处理模板输出路径
|
||||
templateList.ForEach(e => ReplaceTemplateOutput(e, input));
|
||||
|
||||
// 渲染
|
||||
return await RenderList(input, templateList, engine);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 关系对照代码生成策略类
|
||||
/// </summary>
|
||||
[CodeGenStrategy(CodeGenSceneEnum.TableRelationship)]
|
||||
public class TableRelationshipCodeGenStrategy : CodeGenTableStrategyBase<SysCodeGen>, ISingleton
|
||||
{
|
||||
public override Task<List<TemplateContextOutput>> GenerateCode(SysCodeGen input)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 主从明细带树组件代码生成策略类
|
||||
/// </summary>
|
||||
[CodeGenStrategy(CodeGenSceneEnum.TreeMasterSlaveTables)]
|
||||
public class TreeMasterSlaveTablesCodeGenStrategy : CodeGenTableStrategyBase<SysCodeGen>, ISingleton
|
||||
{
|
||||
public override async Task<List<TemplateContextOutput>> GenerateCode(SysCodeGen input)
|
||||
{
|
||||
return await App.GetService<MasterSlaveTablesCodeGenStrategy>().GenerateCode(input);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 单表带树组件代码生成策略类
|
||||
/// </summary>
|
||||
[CodeGenStrategy(CodeGenSceneEnum.TreeSingleTable)]
|
||||
public class TreeSingleTableCodeGenStrategy : CodeGenTableStrategyBase<SysCodeGen>, ISingleton
|
||||
{
|
||||
public override async Task<List<TemplateContextOutput>> GenerateCode(SysCodeGen input)
|
||||
{
|
||||
return await App.GetService<SingleTableCodeGenStrategy>().GenerateCode(input);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.CodeGen;
|
||||
|
||||
/// <summary>
|
||||
/// 关系对照带树组件代码生成策略类
|
||||
/// </summary>
|
||||
[CodeGenStrategy(CodeGenSceneEnum.TreeTableRelationship)]
|
||||
public class TreeTableRelationshipCodeGenStrategy : CodeGenTableStrategyBase<SysCodeGen>, ISingleton
|
||||
{
|
||||
public override async Task<List<TemplateContextOutput>> GenerateCode(SysCodeGen input)
|
||||
{
|
||||
// TODO 关系对照带树组件生成逻辑
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
@ -9,217 +9,124 @@ namespace Admin.NET.Core;
|
||||
/// <summary>
|
||||
/// 代码生成表
|
||||
/// </summary>
|
||||
[SugarTable(null, "代码生成表")]
|
||||
[SysTable]
|
||||
[SugarIndex("i_{table}_b", nameof(BusName), OrderByType.Asc)]
|
||||
[SugarIndex("i_{table}_t", nameof(TableName), OrderByType.Asc)]
|
||||
[SugarTable(null, "代码生成表")]
|
||||
[SugarIndex("index_{table}_b", nameof(BusName), OrderByType.Asc)]
|
||||
public partial class SysCodeGen : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 作者姓名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "作者姓名", Length = 32)]
|
||||
[MaxLength(32)]
|
||||
public string? AuthorName { get; set; }
|
||||
[SugarColumn(ColumnDescription = "作者姓名", Length = 32)]
|
||||
public virtual string? AuthorName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否移除表前缀
|
||||
/// 作者邮箱
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否移除表前缀", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? TablePrefix { get; set; }
|
||||
[MaxLength(32)]
|
||||
[SugarColumn(ColumnDescription = "作者邮箱", Length = 32)]
|
||||
public virtual string? Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生成方式
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "生成方式", Length = 32)]
|
||||
[MaxLength(32)]
|
||||
public string? GenerateType { get; set; }
|
||||
[SugarColumn(ColumnDescription = "生成方式")]
|
||||
public virtual CodeGenMethodEnum GenerateMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库定位器名
|
||||
/// 生成场景
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "库定位器名", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? ConfigId { get; set; }
|
||||
[SugarColumn(ColumnDescription = "生成场景")]
|
||||
public virtual CodeGenSceneEnum Scene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库名(保留字段)
|
||||
/// 树组件配置
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "数据库库名", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? DbName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "数据库类型", DefaultValue = "4")]
|
||||
public SqlSugar.DbType DbType { get; set; } = SqlSugar.DbType.PostgreSQL;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库链接
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "数据库链接", Length = 512)]
|
||||
[MaxLength(512)]
|
||||
public string? ConnectionString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "数据库表名", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public string? TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 树控件名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "树控件名称", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? TreeName { get; set; }
|
||||
[SugarColumn(ColumnDescription = "树组件配置", IsJson = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public virtual TreeWithTableConfigInput? TreeConfig { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 命名空间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "命名空间", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public string? NameSpace { get; set; }
|
||||
[SugarColumn(ColumnDescription = "命名空间", Length = 128)]
|
||||
public virtual string NameSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "业务名", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public string? BusName { get; set; }
|
||||
[SugarColumn(ColumnDescription = "业务名", Length = 128)]
|
||||
public virtual string BusName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表唯一字段配置
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "表唯一字段配置", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public string? TableUniqueConfig { get; set; }
|
||||
[MaxLength(32)]
|
||||
[SugarColumn(ColumnDescription = "模块名称", Length = 32)]
|
||||
public virtual string ModuleName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否水平布局
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否水平布局")]
|
||||
public virtual bool IsHorizontal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否生成菜单
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否生成菜单")]
|
||||
public bool GenerateMenu { get; set; } = true;
|
||||
public virtual bool GenerateMenu { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 菜单图标
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "菜单图标", Length = 32)]
|
||||
public string? MenuIcon { get; set; } = "ele-Menu";
|
||||
public virtual string MenuIcon { get; set; } = "ele-Menu";
|
||||
|
||||
/// <summary>
|
||||
/// 菜单编码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "菜单编码")]
|
||||
public long? MenuPid { get; set; }
|
||||
public virtual long MenuPid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 页面目录
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "页面目录", Length = 32)]
|
||||
public string? PagePath { get; set; }
|
||||
public virtual string PagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支持打印类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "支持打印类型", Length = 32)]
|
||||
[MaxLength(32)]
|
||||
public string? PrintType { get; set; }
|
||||
[SugarColumn(ColumnDescription = "支持打印类型")]
|
||||
public virtual CodeGenPrintTypeEnum PrintType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 打印模版名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "打印模版名称", Length = 32)]
|
||||
[MaxLength(32)]
|
||||
public string? PrintName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 左边树形结构表
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "左边树形结构表", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? LeftTab { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 左边关联字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "左边关联字段", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? LeftKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 左边关联主表字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "左边关联主表字段", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? LeftPrimaryKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 左边树名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "左边树名称", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? LeftName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下表名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "右区域下框表名称", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? BottomTab { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下表关联字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "右区域下框表关联字段", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? BottomKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下表关联主表字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "右区域下框表关联主表字段", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? BottomPrimaryKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板文件夹
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "模板文件夹", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? Template { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "表类型", Length = 64)]
|
||||
public string TabType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 树控件PidKey字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "树控件PidKey字段", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? TreeKey { get; set; }
|
||||
[SugarColumn(ColumnDescription = "打印模版名称", Length = 32)]
|
||||
public virtual string? PrintName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用 Api Service
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否使用 Api Service")]
|
||||
public bool IsApiService { get; set; } = false;
|
||||
public virtual bool IsApiService { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 模板关系:SysCodeGenTemplateRelation表中的CodeGenId,注意禁止给CodeGenTemplateRelations手动赋值
|
||||
/// 关联表
|
||||
/// </summary>
|
||||
[Navigate(NavigateType.OneToMany, nameof(SysCodeGenTemplateRelation.CodeGenId))]
|
||||
public List<SysCodeGenTemplateRelation> CodeGenTemplateRelations { get; set; }
|
||||
[Navigate(NavigateType.OneToMany, nameof(SysCodeGenTable.CodeGenId))]
|
||||
public List<SysCodeGenTable> TableList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表唯一字段列表
|
||||
/// 简拼
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public virtual List<TableUniqueConfigItem> TableUniqueList => string.IsNullOrWhiteSpace(TableUniqueConfig) ? null : JSON.Deserialize<List<TableUniqueConfigItem>>(TableUniqueConfig);
|
||||
[BindTextAbbr(nameof(BusName))]
|
||||
[SugarColumn(ColumnDescription = "简拼", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public virtual string? Pinyin { get; set; }
|
||||
}
|
||||
162
Admin.NET/Admin.NET.Core/Entity/SysCodeGenColumn.cs
Normal file
162
Admin.NET/Admin.NET.Core/Entity/SysCodeGenColumn.cs
Normal file
@ -0,0 +1,162 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成表字段配置表
|
||||
/// </summary>
|
||||
[SysTable]
|
||||
[SugarTable(null, "代码生成表字段配置表")]
|
||||
[SugarIndex("index_{table}_cti", nameof(CodeGenTableId), OrderByType.Asc)]
|
||||
[SugarIndex("index_{table}_cn", nameof(ColumnName), OrderByType.Asc)]
|
||||
public partial class SysCodeGenColumn : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 代码生成表Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "表Id")]
|
||||
public virtual long CodeGenTableId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库字段名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "字段名称", Length = 128)]
|
||||
[Required, MaxLength(128)]
|
||||
public virtual string ColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体属性名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "属性名称", Length = 128)]
|
||||
[Required, MaxLength(128)]
|
||||
public virtual string PropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// .NET数据类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "NET数据类型", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public virtual string NetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库中类型(物理类型)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "数据库中类型", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public virtual string DataType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段数据长度
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "字段数据长度")]
|
||||
public virtual int? ColumnLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段描述
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "字段描述", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public virtual string ColumnComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 控件类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "控件类型")]
|
||||
public virtual CodeGenEffectTypeEnum EffectType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 控件配置
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "控件配置", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public virtual string? Config { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "主键")]
|
||||
public virtual bool IsPrimarykey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否通用字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否通用字段")]
|
||||
public virtual bool IsCommon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否必填
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否必填")]
|
||||
public virtual bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 增改
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "增改")]
|
||||
public virtual bool IsAddUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导入导出
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "导入导出")]
|
||||
public virtual bool IsImport { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否可排序
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否可排序")]
|
||||
public virtual bool IsSortable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是统计字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否是统计字段")]
|
||||
public virtual bool IsStatistical { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是查询条件
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否是查询条件")]
|
||||
public virtual bool IsQuery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询方式
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "查询方式", Length = 16)]
|
||||
[MaxLength(16)]
|
||||
public virtual string? QueryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 列表显示
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "列表显示")]
|
||||
public virtual bool IsTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 内容复制
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "内容复制")]
|
||||
public virtual bool IsCopy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "默认值", Length = 256)]
|
||||
[MaxLength(256)]
|
||||
public virtual string? DefaultValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段验证规则
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "字段验证规则")]
|
||||
public virtual CodeGenFromRuleValidEnum? FromValid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "排序", DefaultValue = "100")]
|
||||
public virtual int OrderNo { get; set; } = 100;
|
||||
}
|
||||
@ -1,234 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成字段配置表
|
||||
/// </summary>
|
||||
[SugarTable(null, "代码生成字段配置表")]
|
||||
[SysTable]
|
||||
public partial class SysCodeGenConfig : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 代码生成主表Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "主表Id")]
|
||||
public long CodeGenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库字段名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "字段名称", Length = 128)]
|
||||
[Required, MaxLength(128)]
|
||||
public virtual string ColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体属性名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "属性名称", Length = 128)]
|
||||
[Required, MaxLength(128)]
|
||||
public virtual string PropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段数据长度
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "字段数据长度", DefaultValue = "0")]
|
||||
public int ColumnLength { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 字段描述
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "字段描述", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public string? ColumnComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// .NET数据类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "NET数据类型", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? NetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作用类型(字典)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "作用类型", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? EffectType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键库标识
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "外键库标识", Length = 20)]
|
||||
[MaxLength(20)]
|
||||
public string? FkConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键实体名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "外键实体名称", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? FkEntityName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键表名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "外键表名称", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public string? FkTableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键显示字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "外键显示字段", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? FkColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键链接字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "外键链接字段", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? FkLinkColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键显示字段.NET类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "外键显示字段.NET类型", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? FkColumnNetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字典编码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "字典编码", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? DictTypeCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否缩进列表(字典)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否缩进列表", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? WhetherRetract { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否必填(字典)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否必填", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? WhetherRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否可排序(字典)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否可排序", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? WhetherSortable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是统计字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否是统计字段", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? Statistical { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是分组字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否是分组字段", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? IsGroupBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是查询条件
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否是查询条件", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? QueryWhether { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询方式
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "查询方式", Length = 16)]
|
||||
[MaxLength(16)]
|
||||
public string? QueryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 列表显示
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "列表显示", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? WhetherTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 增改
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "增改", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? WhetherAddUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "主键", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? ColumnKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库中类型(物理类型)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "数据库中类型", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public string? DataType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否通用字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否通用字段", Length = 8)]
|
||||
[MaxLength(8)]
|
||||
public string? WhetherCommon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 显示文本字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "显示文本字段", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? DisplayColumn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 选中值字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "选中值字段", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public string? ValueColumn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父级字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "父级字段", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public string? PidColumn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "排序", DefaultValue = "100")]
|
||||
public int OrderNo { get; set; } = 100;
|
||||
|
||||
/// <summary>
|
||||
/// 字段验证规则
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "字段验证规则", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
public string? Rules { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "默认值", Length = 256)]
|
||||
[MaxLength(256)]
|
||||
public string? DefaultValue { get; set; }
|
||||
}
|
||||
77
Admin.NET/Admin.NET.Core/Entity/SysCodeGenTable.cs
Normal file
77
Admin.NET/Admin.NET.Core/Entity/SysCodeGenTable.cs
Normal file
@ -0,0 +1,77 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成关联表
|
||||
/// </summary>
|
||||
[SysTable]
|
||||
[SugarTable(null, "代码生成关联表")]
|
||||
[SugarIndex("index_{table}_cgi", nameof(CodeGenId), OrderByType.Asc)]
|
||||
[SugarIndex("index_{table}_tn", nameof(TableName), OrderByType.Asc)]
|
||||
public partial class SysCodeGenTable : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 代码生成Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "代码生成Id")]
|
||||
[Required]
|
||||
public virtual long CodeGenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库配置id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "数据库配置id", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public virtual string ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "数据库表名", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public virtual string TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表实体名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "表实体名称", Length = 128)]
|
||||
[MaxLength(128)]
|
||||
public virtual string EntityName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "模块名称", Length = 64)]
|
||||
[MaxLength(64)]
|
||||
public virtual string ModuleName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务名
|
||||
/// </summary>
|
||||
[MaxLength(128)]
|
||||
[SugarColumn(ColumnDescription = "业务名", Length = 128)]
|
||||
public virtual string BusName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上级联表字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "上级联表字段", Length = 32)]
|
||||
public virtual string? LastLinkPropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下级联表字段
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "下级联表字段", Length = 32)]
|
||||
public virtual string? NextLinkPropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联字段
|
||||
/// </summary>
|
||||
[Navigate(NavigateType.OneToMany, nameof(SysCodeGenColumn.CodeGenTableId))]
|
||||
public virtual List<SysCodeGenColumn> ColumnList { get; set; }
|
||||
}
|
||||
@ -1,60 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成模板配置表
|
||||
/// </summary>
|
||||
[SugarTable(null, "代码生成模板配置表")]
|
||||
[SysTable]
|
||||
public partial class SysCodeGenTemplate : EntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 模板文件名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "模板文件名", Length = 128)]
|
||||
[Required, MaxLength(128)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "代码生成类型", DefaultValue = "2")]
|
||||
public CodeGenTypeEnum Type { get; set; } = CodeGenTypeEnum.Backend;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是内置模板(Y-是,N-否)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否是内置模板", DefaultValue = "1")]
|
||||
public YesNoEnum SysFlag { get; set; } = YesNoEnum.Y;
|
||||
|
||||
/// <summary>
|
||||
/// 是否默认
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否默认")]
|
||||
public bool? IsDefault { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 输出位置
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "输出位置", Length = 256)]
|
||||
[Required, MaxLength(256)]
|
||||
public string OutputFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "描述", Length = 256)]
|
||||
[Required, MaxLength(256)]
|
||||
public string Describe { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "排序", DefaultValue = "100")]
|
||||
public int OrderNo { get; set; } = 100;
|
||||
}
|
||||
47
Admin.NET/Admin.NET.Core/Enum/CodeGenEffectTypeEnum.cs
Normal file
47
Admin.NET/Admin.NET.Core/Enum/CodeGenEffectTypeEnum.cs
Normal file
@ -0,0 +1,47 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成控件类型枚举
|
||||
/// </summary>
|
||||
[Description("代码生成控件类型枚举")]
|
||||
public enum CodeGenEffectTypeEnum
|
||||
{
|
||||
[Description("输入框")]
|
||||
Input = 100,
|
||||
|
||||
[Description("字典选择器")]
|
||||
DictSelector = 101,
|
||||
|
||||
[Description("常量选择器")]
|
||||
ConstSelector = 102,
|
||||
|
||||
[Description("枚举选择器")]
|
||||
EnumSelector = 103,
|
||||
|
||||
[Description("树选择器")]
|
||||
ApiTreeSelector = 104,
|
||||
|
||||
[Description("外键")]
|
||||
ForeignKey = 105,
|
||||
|
||||
[Description("数字输入框")]
|
||||
InputNumber = 106,
|
||||
|
||||
[Description("时间选择")]
|
||||
DatePicker = 107,
|
||||
|
||||
[Description("文本域")]
|
||||
InputTextArea = 108,
|
||||
|
||||
[Description("上传")]
|
||||
Upload = 109,
|
||||
|
||||
[Description("开关")]
|
||||
Switch = 110
|
||||
}
|
||||
152
Admin.NET/Admin.NET.Core/Enum/CodeGenFromRuleValidEnum.cs
Normal file
152
Admin.NET/Admin.NET.Core/Enum/CodeGenFromRuleValidEnum.cs
Normal file
@ -0,0 +1,152 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成表单校验类型枚举
|
||||
/// </summary>
|
||||
[Description("代码生成表单校验类型枚举")]
|
||||
public enum CodeGenFromRuleValidEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 唯一性校验
|
||||
/// </summary>
|
||||
[Description("唯一性")]
|
||||
Unique = 100,
|
||||
|
||||
/// <summary>
|
||||
/// 字符串长度校验
|
||||
/// </summary>
|
||||
[Description("字符串长度")]
|
||||
MaxLength,
|
||||
|
||||
/// <summary>
|
||||
/// 数字范围
|
||||
/// </summary>
|
||||
[Description("数字范围")]
|
||||
Range,
|
||||
|
||||
/// <summary>
|
||||
/// 身份证号码
|
||||
/// </summary>
|
||||
[Description("身份证号码")]
|
||||
IDCard,
|
||||
|
||||
/// <summary>
|
||||
/// 邮政编码
|
||||
/// </summary>
|
||||
[Description("邮政编码")]
|
||||
PostCode,
|
||||
|
||||
/// <summary>
|
||||
/// 手机号码
|
||||
/// </summary>
|
||||
[Description("手机号码")]
|
||||
PhoneNumber,
|
||||
|
||||
/// <summary>
|
||||
/// 固话格式
|
||||
/// </summary>
|
||||
[Description("固话格式")]
|
||||
Telephone,
|
||||
|
||||
/// <summary>
|
||||
/// 手机或固话类型
|
||||
/// </summary>
|
||||
[Description("手机或固话类型")]
|
||||
PhoneOrTelNumber,
|
||||
|
||||
/// <summary>
|
||||
/// 邮箱
|
||||
/// </summary>
|
||||
[Description("邮箱")]
|
||||
EmailAddress,
|
||||
|
||||
/// <summary>
|
||||
/// 统一社会信用代码
|
||||
/// </summary>
|
||||
[Description("统一社会信用代码")]
|
||||
SocialCreditCode,
|
||||
|
||||
/// <summary>
|
||||
/// 网址类型
|
||||
/// </summary>
|
||||
[Description("网址类型")]
|
||||
Url,
|
||||
|
||||
/// <summary>
|
||||
/// 中文
|
||||
/// </summary>
|
||||
[Description("中文")]
|
||||
Chinese,
|
||||
|
||||
/// <summary>
|
||||
/// 中文名
|
||||
/// </summary>
|
||||
[Description("中文名")]
|
||||
ChineseName,
|
||||
|
||||
/// <summary>
|
||||
/// 英文名
|
||||
/// </summary>
|
||||
[Description("英文名")]
|
||||
EnglishName,
|
||||
|
||||
/// <summary>
|
||||
/// 纯大写
|
||||
/// </summary>
|
||||
[Description("纯大写")]
|
||||
Capital,
|
||||
|
||||
/// <summary>
|
||||
/// 纯小写
|
||||
/// </summary>
|
||||
[Description("纯小写")]
|
||||
Lowercase,
|
||||
|
||||
/// <summary>
|
||||
/// 字母和数字组合
|
||||
/// </summary>
|
||||
[Description("字母和数字组合")]
|
||||
WordWithNumber,
|
||||
|
||||
/// <summary>
|
||||
/// Html 标签格式
|
||||
/// </summary>
|
||||
[Description("Html 标签格式")]
|
||||
Html,
|
||||
|
||||
/// <summary>
|
||||
/// GUID 或者 UUID
|
||||
/// </summary>
|
||||
[Description("GUID 或者 UUID")]
|
||||
GUID_OR_UUID,
|
||||
|
||||
/// <summary>
|
||||
/// 用户名
|
||||
/// </summary>
|
||||
[Description("用户名")]
|
||||
Username,
|
||||
|
||||
/// <summary>
|
||||
/// 日期类型
|
||||
/// </summary>
|
||||
[Description("日期类型")]
|
||||
Date,
|
||||
|
||||
/// <summary>
|
||||
/// 时间类型
|
||||
/// </summary>
|
||||
[Description("时间类型")]
|
||||
Time,
|
||||
|
||||
/// <summary>
|
||||
/// 年龄
|
||||
/// </summary>
|
||||
[Description("年龄")]
|
||||
Age,
|
||||
}
|
||||
32
Admin.NET/Admin.NET.Core/Enum/CodeGenMethodEnum.cs
Normal file
32
Admin.NET/Admin.NET.Core/Enum/CodeGenMethodEnum.cs
Normal file
@ -0,0 +1,32 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成方式枚举
|
||||
/// </summary>
|
||||
[Description("代码生成方式枚举")]
|
||||
public enum CodeGenMethodEnum
|
||||
{
|
||||
[Description("下载压缩包")]
|
||||
DownloadZip = 100,
|
||||
|
||||
[Description("下载压缩包(前端)")]
|
||||
DownloadZipFrontend = 101,
|
||||
|
||||
[Description("下载压缩包(后端)")]
|
||||
DownloadZipBackend = 102,
|
||||
|
||||
[Description("生成到本项目")]
|
||||
GenerateToProject = 200,
|
||||
|
||||
[Description("生成到本项目(前端)")]
|
||||
GenerateToProjectFrontend = 201,
|
||||
|
||||
[Description("生成到本项目(后端)")]
|
||||
GenerateToProjectBackend = 202
|
||||
}
|
||||
@ -7,23 +7,20 @@
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成模板关系表
|
||||
/// 代码生成打印类型枚举
|
||||
/// </summary>
|
||||
[SugarTable(null, "代码生成模板关系表")]
|
||||
[SysTable]
|
||||
public partial class SysCodeGenTemplateRelation : EntityBaseId
|
||||
[Description("代码生成打印类型枚举")]
|
||||
public enum CodeGenPrintTypeEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 代码生成Id
|
||||
/// 不需要
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "代码生成Id")]
|
||||
[Required]
|
||||
public long CodeGenId { get; set; }
|
||||
[Description("不需要")]
|
||||
Off = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 模板Id
|
||||
/// 绑定打印模版
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "模板Id")]
|
||||
[Required]
|
||||
public long TemplateId { get; set; }
|
||||
[Description("绑定打印模版")]
|
||||
Custom = 2
|
||||
}
|
||||
68
Admin.NET/Admin.NET.Core/Enum/CodeGenQueryTypeEnum.cs
Normal file
68
Admin.NET/Admin.NET.Core/Enum/CodeGenQueryTypeEnum.cs
Normal file
@ -0,0 +1,68 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成查询类型枚举
|
||||
/// </summary>
|
||||
[Description("代码生成查询类型枚举")]
|
||||
public enum CodeGenQueryTypeEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 等于
|
||||
/// </summary>
|
||||
[Description("等于")]
|
||||
Equal = 100,
|
||||
|
||||
/// <summary>
|
||||
/// 模糊匹配
|
||||
/// </summary>
|
||||
[Description("模糊")]
|
||||
Like = 101,
|
||||
|
||||
/// <summary>
|
||||
/// 大于
|
||||
/// </summary>
|
||||
[Description("大于")]
|
||||
GreaterThan = 102,
|
||||
|
||||
/// <summary>
|
||||
/// 小于
|
||||
/// </summary>
|
||||
[Description("小于")]
|
||||
LessThan = 103,
|
||||
|
||||
/// <summary>
|
||||
/// 不等于
|
||||
/// </summary>
|
||||
[Description("不等于")]
|
||||
NotEqual = 104,
|
||||
|
||||
/// <summary>
|
||||
/// 大于等于
|
||||
/// </summary>
|
||||
[Description("大于等于")]
|
||||
GreaterThanOrEqual = 105,
|
||||
|
||||
/// <summary>
|
||||
/// 小于等于
|
||||
/// </summary>
|
||||
[Description("小于等于")]
|
||||
LessThanOrEqual = 106,
|
||||
|
||||
/// <summary>
|
||||
/// 不为空
|
||||
/// </summary>
|
||||
[Description("不为空")]
|
||||
IsNotNull = 107,
|
||||
|
||||
/// <summary>
|
||||
/// 时间范围
|
||||
/// </summary>
|
||||
[Description("时间范围")]
|
||||
TimeRange = 108
|
||||
}
|
||||
62
Admin.NET/Admin.NET.Core/Enum/CodeGenSceneEnum.cs
Normal file
62
Admin.NET/Admin.NET.Core/Enum/CodeGenSceneEnum.cs
Normal file
@ -0,0 +1,62 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成模板枚举
|
||||
/// </summary>
|
||||
[Description("代码生成模板枚举")]
|
||||
public enum CodeGenSceneEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// 单表
|
||||
/// </summary>
|
||||
[Description("单表")]
|
||||
SingleTable = 1000,
|
||||
|
||||
/// <summary>
|
||||
/// 单表树组件
|
||||
/// </summary>
|
||||
[Description("单表树组件")]
|
||||
TreeSingleTable = 1010,
|
||||
|
||||
/// <summary>
|
||||
/// 主从表
|
||||
/// </summary>
|
||||
[Description("主从表")]
|
||||
MasterSlaveTables = 2000,
|
||||
|
||||
/// <summary>
|
||||
/// 主从表树组件
|
||||
/// </summary>
|
||||
[Description("主从表树组件")]
|
||||
TreeMasterSlaveTables = 2010,
|
||||
|
||||
/// <summary>
|
||||
/// 关系对照
|
||||
/// </summary>
|
||||
[Description("关系对照")]
|
||||
TableRelationship = 3000,
|
||||
|
||||
/// <summary>
|
||||
/// 关系对照树组件
|
||||
/// </summary>
|
||||
[Description("关系对照树组件")]
|
||||
TreeTableRelationship = 3010,
|
||||
|
||||
/// <summary>
|
||||
/// 表实体
|
||||
/// </summary>
|
||||
[Description("表实体")]
|
||||
TableEntity = -1000,
|
||||
|
||||
/// <summary>
|
||||
/// 表种子数据
|
||||
/// </summary>
|
||||
[Description("表种子数据")]
|
||||
TableSeedData = -2000,
|
||||
}
|
||||
@ -583,6 +583,12 @@ public enum ErrorCodeEnum
|
||||
[ErrorCodeItemMetadata("禁止越权操作系统内置参数")]
|
||||
D9002,
|
||||
|
||||
/// <summary>
|
||||
/// 无效的参数键值
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("无效的参数键值")]
|
||||
D9003,
|
||||
|
||||
/// <summary>
|
||||
/// 已存在同名任务调度
|
||||
/// </summary>
|
||||
@ -626,11 +632,41 @@ public enum ErrorCodeEnum
|
||||
D1303,
|
||||
|
||||
/// <summary>
|
||||
/// 该表代码模板已经生成过
|
||||
/// 未处理的场景类型
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("该表代码模板已经生成过")]
|
||||
[ErrorCodeItemMetadata("未处理的场景类型【{0}】")]
|
||||
D1400,
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成表数据为空
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("代码生成表数据为空")]
|
||||
D1401,
|
||||
|
||||
/// <summary>
|
||||
/// 树组件配置参数不能为空
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("树组件配置参数不能为空")]
|
||||
D1402,
|
||||
|
||||
/// <summary>
|
||||
/// 字段控件类型配置不能为空
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("字段控件类型配置不能为空")]
|
||||
D1403,
|
||||
|
||||
/// <summary>
|
||||
/// 后端服务不存在
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("{0}Service后端服务不存在,请检查【使用现有Api】参数")]
|
||||
D1404,
|
||||
|
||||
/// <summary>
|
||||
/// 表实体必须指定至少一个主键
|
||||
/// </summary>
|
||||
[ErrorCodeItemMetadata("[{0}]表实体必须指定至少一个主键")]
|
||||
D1405,
|
||||
|
||||
/// <summary>
|
||||
/// 该类型不存在
|
||||
/// </summary>
|
||||
|
||||
@ -1,266 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.SeedData;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成模板配置表 表种子数据
|
||||
/// </summary>
|
||||
[IgnoreUpdateSeed]
|
||||
public class SysCodeGenTemplateSeedData : ISqlSugarEntitySeedData<SysCodeGenTemplate>
|
||||
{
|
||||
/// <summary>
|
||||
/// 种子数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<SysCodeGenTemplate> HasData()
|
||||
{
|
||||
string recordList = @"
|
||||
[
|
||||
{
|
||||
""Name"": ""web_api.ts.vm"",
|
||||
""Type"": 1,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": false,
|
||||
""OutputFile"": ""api/{PagePath}/{TableNameLower}.ts"",
|
||||
""Describe"": ""(WEB)接口请求"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 23:02:29"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000101
|
||||
},
|
||||
{
|
||||
""Name"": ""web_views_index.vue.vm"",
|
||||
""Type"": 1,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": true,
|
||||
""OutputFile"": ""views/{PagePath}/{TableNameLower}/index.vue"",
|
||||
""Describe"": ""(WEB)前端页面"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 23:02:29"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000111
|
||||
},
|
||||
{
|
||||
""Name"": ""web_views_List.vue.vm"",
|
||||
""Type"": 1,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": true,
|
||||
""OutputFile"": ""views/{PagePath}/{TableNameLower}/component/list.vue"",
|
||||
""Describe"": ""(WEB)表格组件"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 21:25:43"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000121
|
||||
},
|
||||
{
|
||||
""Name"": ""web_views_editDialog.vue.vm"",
|
||||
""Type"": 1,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": true,
|
||||
""OutputFile"": ""views/{PagePath}/{TableNameLower}/component/edit.vue"",
|
||||
""Describe"": ""(WEB)编辑对话框"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 23:02:29"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000131
|
||||
},
|
||||
{
|
||||
""Name"": ""service_Service.cs.vm"",
|
||||
""Type"": 2,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": true,
|
||||
""OutputFile"": ""Service/{TableName}/{TableName}Service.cs"",
|
||||
""Describe"": ""(服务端)接口服务"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 23:02:29"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000141
|
||||
},
|
||||
{
|
||||
""Name"": ""service_InputDto.cs.vm"",
|
||||
""Type"": 2,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": true,
|
||||
""OutputFile"": ""Service/{TableName}/Dto/{TableName}Input.cs"",
|
||||
""Describe"": ""(服务端)输入参数"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 23:02:29"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000151
|
||||
},
|
||||
{
|
||||
""Name"": ""service_OutputDto.cs.vm"",
|
||||
""Type"": 2,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": true,
|
||||
""OutputFile"": ""Service/{TableName}/Dto/{TableName}Output.cs"",
|
||||
""Describe"": ""(服务端)输出参数"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 23:02:29"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000161
|
||||
},
|
||||
{
|
||||
""Name"": ""sys_menu_seed_data.cs.vm"",
|
||||
""Type"": 3,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": true,
|
||||
""OutputFile"": ""SeedData/{TableName}MenuSeedData.cs"",
|
||||
""Describe"": ""(服务端)菜单种子数据"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 23:02:29"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000171
|
||||
},
|
||||
{
|
||||
""Name"": ""web_views_el_table_index.vue.vm"",
|
||||
""Type"": 1,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": false,
|
||||
""OutputFile"": ""views/{PagePath}/{TableNameLower}/index.vue"",
|
||||
""Describe"": ""(WEB)前端页面,基于el-table(和默认的vxetable互斥)"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 23:02:29"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000181
|
||||
},
|
||||
{
|
||||
""Name"": ""PartialEntity_Entity.cs.vm"",
|
||||
""Type"": 2,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": false,
|
||||
""OutputFile"": ""PartialEntity/{TableName}Entity.cs"",
|
||||
""Describe"": ""(实体扩展)Partial实体"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 21:25:43"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000191
|
||||
},
|
||||
{
|
||||
""Name"": ""PartialService_Service.cs.vm"",
|
||||
""Type"": 2,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": false,
|
||||
""OutputFile"": ""PartialService/{TableName}/{TableName}Service.cs"",
|
||||
""Describe"": ""(服务扩展)Partial服务"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 21:25:43"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000201
|
||||
},
|
||||
{
|
||||
""Name"": ""web_views_Tree.vue.vm"",
|
||||
""Type"": 1,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": false,
|
||||
""OutputFile"": ""views/{PagePath}/{TableNameLower}/component/{TableNameLower}Tree.vue"",
|
||||
""Describe"": ""(WEB)左边树型组件"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 21:25:43"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000211
|
||||
},
|
||||
{
|
||||
""Name"": ""service_Mid.cs.vm"",
|
||||
""Type"": 2,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": true,
|
||||
""OutputFile"": ""Service/{TableName}/Dto/{TableName}Mid.cs"",
|
||||
""Describe"": ""(服务端)中间件"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 21:25:43"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000215
|
||||
},
|
||||
{
|
||||
""Name"": ""web_views_language.ts.vm"",
|
||||
""Type"": 1,
|
||||
""SysFlag"": 1,
|
||||
""IsDefault"": true,
|
||||
""OutputFile"": ""i18n/pages/{TableNameLower}/zh-CN.ts"",
|
||||
""Describe"": ""(WEB)多语言模板,默认数据库中文备注,其他语言自己用AI替换"",
|
||||
""OrderNo"": 100,
|
||||
""CreateTime"": ""1900-01-01 00:00:00"",
|
||||
""UpdateTime"": ""2025-01-13 23:02:29"",
|
||||
""CreateUserId"": null,
|
||||
""CreateUserName"": null,
|
||||
""UpdateUserId"": null,
|
||||
""UpdateUserName"": null,
|
||||
""IsDelete"": false,
|
||||
""Id"": 1300000000216
|
||||
},
|
||||
]
|
||||
";
|
||||
var records = JSON.Deserialize<List<SysCodeGenTemplate>>(recordList);
|
||||
return records;
|
||||
}
|
||||
}
|
||||
@ -1,129 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义模板引擎
|
||||
/// </summary>
|
||||
public class CustomViewEngine : ViewEngineModel
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
|
||||
public CustomViewEngine()
|
||||
{
|
||||
}
|
||||
|
||||
public CustomViewEngine(ISqlSugarClient db)
|
||||
{
|
||||
_db = db;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 库定位器
|
||||
/// </summary>
|
||||
public string ConfigId { get; set; } = SqlSugarConst.MainConfigId;
|
||||
|
||||
public string AuthorName { get; set; }
|
||||
|
||||
public string BusName { get; set; }
|
||||
|
||||
public string NameSpace { get; set; }
|
||||
|
||||
public string ClassName { get; set; }
|
||||
|
||||
public string ProjectLastName { get; set; }
|
||||
|
||||
public string LowerClassName
|
||||
{
|
||||
get
|
||||
{
|
||||
return ClassName[..1].ToLower() + ClassName[1..]; // 首字母小写
|
||||
}
|
||||
}
|
||||
|
||||
public string? TreeName { get; set; }
|
||||
public string? TreeKey { get; set; }
|
||||
public string? LowerTreeName { get; set; }
|
||||
public string? LeftTab { get; set; }
|
||||
public string? LowerLeftTab { get; set; }
|
||||
public string? LeftKey { get; set; }
|
||||
public string? LeftPrimaryKey { get; set; }
|
||||
public string? LowerLeftKey { get; set; }
|
||||
public string? LowerLeftPrimaryKey { get; set; }
|
||||
public string? LeftName { get; set; }
|
||||
public string? BottomTab { get; set; }
|
||||
public string? LowerBottomTab { get; set; }
|
||||
public string? BottomKey { get; set; }
|
||||
public string? BottomPrimaryKey { get; set; }
|
||||
public string? LowerBottomKey { get; set; }
|
||||
public string? LowerBottomPrimaryKey { get; set; }
|
||||
public string TabType { get; set; }
|
||||
public string PagePath { get; set; } = "main";
|
||||
|
||||
public bool IsJoinTable { get; set; }
|
||||
|
||||
public bool IsUpload { get; set; }
|
||||
|
||||
public string PrintType { get; set; }
|
||||
|
||||
public string PrintName { get; set; }
|
||||
|
||||
public bool IsApiService { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 远程验证
|
||||
/// </summary>
|
||||
public bool RemoteVerify { get; set; }
|
||||
|
||||
public List<CodeGenConfig> QueryWhetherList { get; set; }
|
||||
|
||||
public List<CodeGenConfig> TableField { get; set; }
|
||||
|
||||
private List<ColumnOuput> ColumnList { get; set; }
|
||||
|
||||
public List<TableUniqueConfigItem> TableUniqueConfigList { get; set; }
|
||||
|
||||
public string GetColumnNetType(object tbName, object colName)
|
||||
{
|
||||
if (tbName == null || colName == null) return null;
|
||||
|
||||
var config = App.GetOptions<DbConnectionOptions>().ConnectionConfigs.FirstOrDefault(u => u.ConfigId.ToString() == ConfigId);
|
||||
ColumnList = GetColumnListByTableName(tbName.ToString());
|
||||
var col = ColumnList.Where(c => (config.DbSettings.EnableUnderLine
|
||||
? CodeGenHelper.CamelColumnName(c.ColumnName, [])
|
||||
: c.ColumnName) == colName.ToString()).FirstOrDefault();
|
||||
return col.NetType;
|
||||
}
|
||||
|
||||
public List<ColumnOuput> GetColumnListByTableName(string tableName)
|
||||
{
|
||||
// 多库代码生成切换库
|
||||
var provider = _db.AsTenant().GetConnectionScope(ConfigId != SqlSugarConst.MainConfigId ? ConfigId : SqlSugarConst.MainConfigId);
|
||||
|
||||
// 获取实体类型属性
|
||||
var entityType = provider.DbMaintenance.GetTableInfoList().FirstOrDefault(u => u.Name == tableName);
|
||||
|
||||
// 因为ConfigId的表通常也会用到主库的表来做连接,所以这里如果在ConfigId中找不到实体也尝试一下在主库中查找
|
||||
if (ConfigId == SqlSugarConst.MainConfigId && entityType == null) return null;
|
||||
if (ConfigId != SqlSugarConst.MainConfigId)
|
||||
{
|
||||
provider = _db.AsTenant().GetConnectionScope(SqlSugarConst.MainConfigId);
|
||||
entityType = provider.DbMaintenance.GetTableInfoList().FirstOrDefault(u => u.Name == tableName);
|
||||
if (entityType == null) return null;
|
||||
}
|
||||
|
||||
// 按原始类型的顺序获取所有实体类型属性(不包含导航属性,会返回null)
|
||||
return provider.DbMaintenance.GetColumnInfosByTableName(entityType.Name).Select(u => new ColumnOuput
|
||||
{
|
||||
ColumnName = u.DbColumnName,
|
||||
ColumnKey = u.IsPrimarykey.ToString(),
|
||||
DataType = u.DataType.ToString(),
|
||||
NetType = CodeGenHelper.ConvertDataType(u, provider.CurrentConnectionConfig.DbType),
|
||||
ColumnComment = u.ColumnDescription
|
||||
}).ToList();
|
||||
}
|
||||
}
|
||||
@ -1,239 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成详细配置参数
|
||||
/// </summary>
|
||||
public class CodeGenConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成主表ID
|
||||
/// </summary>
|
||||
public long CodeGenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库字段名
|
||||
/// </summary>
|
||||
public string ColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体属性名
|
||||
/// </summary>
|
||||
public string PropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段数据长度
|
||||
/// </summary>
|
||||
public int ColumnLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库字段名(首字母小写)
|
||||
/// </summary>
|
||||
public string LowerPropertyName => string.IsNullOrWhiteSpace(PropertyName) ? null : PropertyName[..1].ToLower() + PropertyName[1..];
|
||||
|
||||
/// <summary>
|
||||
/// 字段描述
|
||||
/// </summary>
|
||||
public string ColumnComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// .NET类型
|
||||
/// </summary>
|
||||
public string NetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作用类型(字典)
|
||||
/// </summary>
|
||||
public string EffectType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键库标识
|
||||
/// </summary>
|
||||
public string FkConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键实体名称
|
||||
/// </summary>
|
||||
public string FkEntityName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键表名称
|
||||
/// </summary>
|
||||
public string FkTableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键实体名称(首字母小写)
|
||||
/// </summary>
|
||||
public string LowerFkEntityName =>
|
||||
string.IsNullOrWhiteSpace(FkEntityName) ? null : FkEntityName[..1].ToLower() + FkEntityName[1..];
|
||||
|
||||
/// <summary>
|
||||
/// 外键显示字段
|
||||
/// </summary>
|
||||
public string FkColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键链接字段
|
||||
/// </summary>
|
||||
public string FkLinkColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键显示字段(首字母小写)
|
||||
/// </summary>
|
||||
public string LowerFkColumnName =>
|
||||
string.IsNullOrWhiteSpace(FkColumnName) ? null : FkColumnName[..1].ToLower() + FkColumnName[1..];
|
||||
|
||||
/// <summary>
|
||||
/// 外键显示字段.NET类型
|
||||
/// </summary>
|
||||
public string FkColumnNetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字典code
|
||||
/// </summary>
|
||||
public string DictTypeCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 列表是否缩进(字典)
|
||||
/// </summary>
|
||||
public string WhetherRetract { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否必填(字典)
|
||||
/// </summary>
|
||||
public string WhetherRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否可排序(字典)
|
||||
/// </summary>
|
||||
public string WhetherSortable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是统计字段
|
||||
/// </summary>
|
||||
public string Statistical { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是GroupBy字段
|
||||
/// </summary>
|
||||
public string? IsGroupBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是查询条件
|
||||
/// </summary>
|
||||
public string QueryWhether { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询方式
|
||||
/// </summary>
|
||||
public string QueryType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 列表显示
|
||||
/// </summary>
|
||||
public string WhetherTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 增改
|
||||
/// </summary>
|
||||
public string WhetherAddUpdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主外键
|
||||
/// </summary>
|
||||
public string ColumnKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库中类型(物理类型)
|
||||
/// </summary>
|
||||
public string DataType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是通用字段
|
||||
/// </summary>
|
||||
public string WhetherCommon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表的别名 Table as XXX
|
||||
/// </summary>
|
||||
public string TableNickName
|
||||
{
|
||||
get
|
||||
{
|
||||
string str = "";
|
||||
if (EffectType == "ForeignKey")
|
||||
{
|
||||
str = LowerFkEntityName + "_FK_" + LowerFkColumnName;
|
||||
}
|
||||
else if (EffectType == "Upload")
|
||||
{
|
||||
str = "sysFile_FK_" + LowerPropertyName;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示文本字段
|
||||
/// </summary>
|
||||
public string DisplayColumn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 选中值字段
|
||||
/// </summary>
|
||||
public string ValueColumn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父级字段
|
||||
/// </summary>
|
||||
public string PidColumn { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int OrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段验证规则
|
||||
/// </summary>
|
||||
public string Rules { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
public string? DefaultValue { get; set; }
|
||||
|
||||
#region 不在数据库中的字段
|
||||
|
||||
/// <summary>
|
||||
/// 字段验证集合
|
||||
/// </summary>
|
||||
public List<VerifyRuleItem>? RuleItems { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否远程验证
|
||||
/// </summary>
|
||||
public bool RemoteVerify { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否存在验证规则
|
||||
/// </summary>
|
||||
public bool AnyRule { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 验证触发器
|
||||
/// </summary>
|
||||
public string Trigger { get; set; }
|
||||
|
||||
#endregion 不在数据库中的字段
|
||||
}
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成参数类
|
||||
@ -12,129 +12,32 @@ namespace Admin.NET.Core.Service;
|
||||
public class PageCodeGenInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 作者姓名
|
||||
/// 业务名
|
||||
/// </summary>
|
||||
public virtual string AuthorName { get; set; }
|
||||
public string BusName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类名
|
||||
/// 表名
|
||||
/// </summary>
|
||||
public virtual string ClassName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否移除表前缀
|
||||
/// </summary>
|
||||
public virtual string TablePrefix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库定位器名
|
||||
/// </summary>
|
||||
public virtual string ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库名(保留字段)
|
||||
/// </summary>
|
||||
public virtual string DbName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库类型
|
||||
/// </summary>
|
||||
public virtual string DbType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库链接
|
||||
/// </summary>
|
||||
public virtual string ConnectionString { get; set; }
|
||||
public string TableName { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成参数类
|
||||
/// </summary>
|
||||
public class AddCodeGenInput : SysCodeGen
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成方式
|
||||
/// </summary>
|
||||
public virtual string GenerateType { get; set; }
|
||||
[Dict(nameof(CodeGenMethodEnum))]
|
||||
public override CodeGenMethodEnum GenerateMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表名
|
||||
/// 生成场景
|
||||
/// </summary>
|
||||
public virtual string TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 树控件名称
|
||||
/// </summary>
|
||||
public string? TreeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 树控件key
|
||||
/// </summary>
|
||||
public string? TreeKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 命名空间
|
||||
/// </summary>
|
||||
public virtual string NameSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务名(业务代码包名称)
|
||||
/// </summary>
|
||||
public virtual string BusName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 功能名(数据库表名称)
|
||||
/// </summary>
|
||||
public virtual string TableComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单应用分类(应用编码)
|
||||
/// </summary>
|
||||
public virtual string MenuApplication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否生成菜单
|
||||
/// </summary>
|
||||
public virtual bool GenerateMenu { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单父级
|
||||
/// </summary>
|
||||
public virtual long? MenuPid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单图标
|
||||
/// </summary>
|
||||
public virtual string MenuIcon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 页面目录
|
||||
/// </summary>
|
||||
public virtual string PagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支持打印类型
|
||||
/// </summary>
|
||||
public virtual string PrintType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 打印模版名称
|
||||
/// </summary>
|
||||
public virtual string PrintName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用 Api Service
|
||||
/// </summary>
|
||||
public virtual bool IsApiService { get; set; }
|
||||
}
|
||||
|
||||
public class AddCodeGenInput : PageCodeGenInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据库表名
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "数据库表名不能为空")]
|
||||
public override string TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务名(业务代码包名称)
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "业务名不能为空")]
|
||||
public override string BusName { get; set; }
|
||||
[Dict(nameof(CodeGenSceneEnum))]
|
||||
public override CodeGenSceneEnum Scene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 命名空间
|
||||
@ -143,104 +46,145 @@ public class AddCodeGenInput : PageCodeGenInput
|
||||
public override string NameSpace { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作者姓名
|
||||
/// 业务名
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "作者姓名不能为空")]
|
||||
public override string AuthorName { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 类名
|
||||
///// </summary>
|
||||
//[Required(ErrorMessage = "类名不能为空")]
|
||||
//public override string ClassName { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 是否移除表前缀
|
||||
///// </summary>
|
||||
//[Required(ErrorMessage = "是否移除表前缀不能为空")]
|
||||
//public override string TablePrefix { get; set; }
|
||||
[Required(ErrorMessage = "业务名不能为空")]
|
||||
public override string BusName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生成方式
|
||||
/// 关联表
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "生成方式不能为空")]
|
||||
public override string GenerateType { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 功能名(数据库表名称)
|
||||
///// </summary>
|
||||
//[Required(ErrorMessage = "数据库表名不能为空")]
|
||||
//public override string TableComment { get; set; }
|
||||
[Required(ErrorMessage = "关联表列表不能为空")]
|
||||
public new List<AddSysCodeGenTable> TableList { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// 是否生成菜单
|
||||
/// 页面目录
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "是否生成菜单不能为空")]
|
||||
public override bool GenerateMenu { get; set; }
|
||||
[Required(ErrorMessage = "页面目录不能为空")]
|
||||
public override string PagePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用 Api Service
|
||||
/// 支持打印类型
|
||||
/// </summary>
|
||||
public override bool IsApiService { get; set; }
|
||||
[Dict(nameof(CodeGenPrintTypeEnum))]
|
||||
public override CodeGenPrintTypeEnum PrintType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板Id集合
|
||||
/// 页面目录
|
||||
/// </summary>
|
||||
public List<long> CodeGenTemplateIds { get; set; }
|
||||
public new EffectTreeConfigInput TreeConfig { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加关联表
|
||||
/// </summary>
|
||||
public class AddSysCodeGenTable : SysCodeGenTable
|
||||
{
|
||||
/// <summary>
|
||||
/// 代码生成Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "代码生成Id不能为空")]
|
||||
public override long CodeGenId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 左边树形结构表
|
||||
/// 数据库配置id
|
||||
/// </summary>
|
||||
public string? LeftTab { get; set; }
|
||||
[Required(ErrorMessage = "数据库配置id不能为空")]
|
||||
public override string ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 左边关联字段
|
||||
/// 数据库表名
|
||||
/// </summary>
|
||||
public string? LeftKey { get; set; }
|
||||
[Required(ErrorMessage = "数据库表名不能为空")]
|
||||
public override string TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 左边关联主表字段
|
||||
/// 表实体名称
|
||||
/// </summary>
|
||||
public string? LeftPrimaryKey { get; set; }
|
||||
[Required(ErrorMessage = "表实体名称不能为空")]
|
||||
public override string EntityName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 左边树Name
|
||||
/// 模块名称
|
||||
/// </summary>
|
||||
public string? LeftName { get; set; }
|
||||
[Required(ErrorMessage = "模块名称不能为空")]
|
||||
public override string ModuleName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下表名称
|
||||
/// 业务名称
|
||||
/// </summary>
|
||||
public string? BottomTab { get; set; }
|
||||
[Required(ErrorMessage = "业务名称不能为空")]
|
||||
public override string BusName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下表关联字段
|
||||
/// 字段列表
|
||||
/// </summary>
|
||||
public string? BottomKey { get; set; }
|
||||
[Required(ErrorMessage = "字段列表不能为空")]
|
||||
public new List<AddSysCodeGenColumn> ColumnList { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加表字段输入参数
|
||||
/// </summary>
|
||||
public class AddSysCodeGenColumn : SysCodeGenColumn
|
||||
{
|
||||
/// <summary>
|
||||
/// 代码生成表Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "代码生成表Id不能为空")]
|
||||
public override long CodeGenTableId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下表关联主表字段
|
||||
/// 数据库字段名
|
||||
/// </summary>
|
||||
public string? BottomPrimaryKey { get; set; }
|
||||
[Required(ErrorMessage = "数据库字段名不能为空")]
|
||||
public override string ColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板
|
||||
/// 实体属性名
|
||||
/// </summary>
|
||||
public string? Template { get; set; }
|
||||
[Required(ErrorMessage = "实体属性名不能为空")]
|
||||
public override string PropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表类型
|
||||
/// .NET数据类型
|
||||
/// </summary>
|
||||
public string TabType { get; set; }
|
||||
[Required(ErrorMessage = ".NET数据类型不能为空")]
|
||||
public override string NetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库中类型(物理类型)
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "数据库中类型不能为空")]
|
||||
public override string DataType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段描述
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "字段描述不能为空")]
|
||||
public override string ColumnComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 控件类型
|
||||
/// </summary>
|
||||
[Dict(nameof(CodeGenEffectTypeEnum))]
|
||||
public override CodeGenEffectTypeEnum EffectType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段验证规则
|
||||
/// </summary>
|
||||
[Dict(nameof(CodeGenFromRuleValidEnum))]
|
||||
public override CodeGenFromRuleValidEnum? FromValid { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteCodeGenInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 代码生成器Id
|
||||
/// Id列表
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "代码生成器Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
[NotEmpty(ErrorMessage = "Id列表不能为空")]
|
||||
[Required(ErrorMessage = "Id列表不能为空")]
|
||||
public List<long> Id { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateCodeGenInput : AddCodeGenInput
|
||||
@ -249,9 +193,22 @@ public class UpdateCodeGenInput : AddCodeGenInput
|
||||
/// 代码生成器Id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "代码生成器Id不能为空")]
|
||||
public long Id { get; set; }
|
||||
public override long Id { get; set; }
|
||||
}
|
||||
|
||||
public class QueryCodeGenInput : DeleteCodeGenInput
|
||||
/// <summary>
|
||||
/// 获取默认列配置输入参数
|
||||
/// </summary>
|
||||
public class DefaultColumnConfigInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据库配置id
|
||||
/// </summary>
|
||||
public string ConfigId { get; set; } = SqlSugarConst.MainConfigId;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表名
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "数据库表名不能为空")]
|
||||
public string TableName { get; set; }
|
||||
}
|
||||
@ -1,103 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成参数类
|
||||
/// </summary>
|
||||
public class CodeGenOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 代码生成器Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 作者姓名
|
||||
/// </summary>
|
||||
public string AuthorName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类名
|
||||
/// </summary>
|
||||
public string ClassName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否移除表前缀
|
||||
/// </summary>
|
||||
public string TablePrefix { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生成方式
|
||||
/// </summary>
|
||||
public string GenerateType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表名
|
||||
/// </summary>
|
||||
public string TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表类型
|
||||
/// </summary>
|
||||
public string TabType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 包名
|
||||
/// </summary>
|
||||
public string PackageName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务名(业务代码包名称)
|
||||
/// </summary>
|
||||
public string BusName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 功能名(数据库表名称)
|
||||
/// </summary>
|
||||
public string TableComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单应用分类(应用编码)
|
||||
/// </summary>
|
||||
public string MenuApplication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否生成菜单
|
||||
/// </summary>
|
||||
public bool GenerateMenu { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 树控件名称
|
||||
/// </summary>
|
||||
public string? TreeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 树控件key
|
||||
/// </summary>
|
||||
public string? TreeKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 菜单父级
|
||||
/// </summary>
|
||||
public long? MenuPid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支持打印类型
|
||||
/// </summary>
|
||||
public string PrintType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 打印模版名称
|
||||
/// </summary>
|
||||
public string PrintName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用 Api Service
|
||||
/// </summary>
|
||||
public bool IsApiService { get; set; }
|
||||
}
|
||||
@ -4,23 +4,42 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表列
|
||||
/// </summary>
|
||||
public class ColumnOuput
|
||||
public class ColumnOutput
|
||||
{
|
||||
/// <summary>
|
||||
/// 字段名
|
||||
/// 属性信息
|
||||
/// </summary>
|
||||
public string ColumnName { get; set; }
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public PropertyInfo PropertyInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体的Property名
|
||||
/// </summary>
|
||||
public string PropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// .NET字段类型
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public Type PropertyType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// .NET字段类型
|
||||
/// </summary>
|
||||
public string NetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段名
|
||||
/// </summary>
|
||||
public string ColumnName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段数据长度
|
||||
/// </summary>
|
||||
@ -36,28 +55,37 @@ public class ColumnOuput
|
||||
/// </summary>
|
||||
public bool IsPrimarykey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为外键
|
||||
/// </summary>
|
||||
public bool IsForeignKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否允许为空
|
||||
/// </summary>
|
||||
public bool IsNullable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// .NET字段类型
|
||||
/// </summary>
|
||||
public string NetType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字段描述
|
||||
/// </summary>
|
||||
public string ColumnComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主外键
|
||||
/// </summary>
|
||||
public string ColumnKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
public string DefaultValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键属性信息
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public PropertyInfo ForeignProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键表实体类型
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public Type ForeignEntityType { get; set; }
|
||||
}
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库
|
||||
|
||||
@ -0,0 +1,188 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 外键控件配置信息类
|
||||
/// </summary>
|
||||
public class EffectForeignKeyConfigInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 外键库标识
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "外键库标识不能为空")]
|
||||
public virtual string ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键实体名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "外键实体名称不能为空")]
|
||||
public virtual string EntityName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 首字母小写实体名称
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public virtual string LowerEntityName => EntityName?[..1].ToLower() + EntityName?[1..];
|
||||
|
||||
/// <summary>
|
||||
/// 外键表名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "外键表名称不能为空")]
|
||||
public virtual string TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表注释
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "表注释不能为空")]
|
||||
public virtual string TableComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外键显示属性名(多选)
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "外键显示属性名不能为空")]
|
||||
public virtual string DisplayPropertyNames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 首位外键显示属性名
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public virtual string FirstDisplayName => DisplayPropertyNames?.Split(",").First();
|
||||
|
||||
/// <summary>
|
||||
/// 首字母小写首位外键显示属性名
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public virtual string LowerFirstDisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
var displayName = FirstDisplayName;
|
||||
return displayName?[..1].ToLower() + displayName?[1..];
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 外键属性名
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "外键属性名不能为空")]
|
||||
public virtual string LinkPropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 首字母小写外键属性名
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public virtual string LowerLinkPropertyName => LinkPropertyName?[..1].ToLower() + LinkPropertyName?[1..];
|
||||
|
||||
/// <summary>
|
||||
/// 外键显示属性.NET类型
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "外键显示属性.NET类型")]
|
||||
public virtual string LinkPropertyType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用于检索的属性名
|
||||
/// </summary>
|
||||
public virtual string SearchPropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 首字母小写外键属性名
|
||||
/// </summary>
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public virtual string LowerSearchPropertyName => SearchPropertyName?[..1].ToLower() + SearchPropertyName?[1..];
|
||||
|
||||
/// <summary>
|
||||
/// 用于检索的属性.NET类型
|
||||
/// </summary>
|
||||
public virtual string SearchPropertyType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否使用表格
|
||||
/// </summary>
|
||||
public virtual bool UseTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否多选
|
||||
/// </summary>
|
||||
public virtual bool Multiple { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 树控件配置信息类
|
||||
/// </summary>
|
||||
public class EffectTreeConfigInput : EffectForeignKeyConfigInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 树组件标题不能为空
|
||||
/// </summary>
|
||||
public virtual string TreeTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父属性名称
|
||||
/// </summary>
|
||||
public virtual string ParentPropertyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父属性.NET类型
|
||||
/// </summary>
|
||||
public virtual string ParentPropertyType { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 字典控件配置信息类
|
||||
/// </summary>
|
||||
public class EffectDictConfigInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 字典编码
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "字典编码不能为空")]
|
||||
public virtual string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否多选
|
||||
/// </summary>
|
||||
public virtual bool Multiple { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文件控件配置信息类
|
||||
/// </summary>
|
||||
public class EffectFileConfigInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 链接预览
|
||||
/// </summary>
|
||||
public virtual bool UseDownload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 链接文本
|
||||
/// </summary>
|
||||
public virtual string DownloadText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否图片
|
||||
/// </summary>
|
||||
public virtual bool IsImage { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 时间控件配置信息类
|
||||
/// </summary>
|
||||
public class EffectDatePickerConfigInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 格式
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "时间控件格式不能为空")]
|
||||
public virtual string Format { get; set; } = "datetime";
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
public virtual string Default { get; set; }
|
||||
}
|
||||
@ -4,7 +4,7 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库表
|
||||
@ -42,12 +42,12 @@ public class TableOutput
|
||||
public string TableComment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表字段个数
|
||||
/// 字段个数
|
||||
/// </summary>
|
||||
public int ColumnCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 程序集名称
|
||||
/// 所属程序集名称
|
||||
/// </summary>
|
||||
public string AssemblyName { get; set; }
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 单表带树组件模板配置输入参数
|
||||
/// </summary>
|
||||
public class TreeWithTableConfigInput : EffectTreeConfigInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 树标题
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "树标题不能为空")]
|
||||
public override string TreeTitle { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 多表模板配置输入参数
|
||||
/// </summary>
|
||||
public class MoreTableConfigInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否水平布局
|
||||
/// </summary>
|
||||
public bool IsHorizontal { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 对照表扩展配置输入参数
|
||||
/// </summary>
|
||||
public class TableRelationshipConfigInput : MoreTableConfigInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 目标表数据库配置id
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "目标表数据库配置id不能为空")]
|
||||
public string ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 目标表数据库表名
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "目标表数据库表名不能为空")]
|
||||
public string TableName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对照表1链接字段名
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "对照表1链接字段名不能为空")]
|
||||
public string PropertyName1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对照表2链接字段名
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "对照表2链接字段名不能为空")]
|
||||
public string PropertyName2 { get; set; }
|
||||
}
|
||||
@ -0,0 +1,473 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Core.CodeGen;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 代码生成表字段配置 🧩
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Order = 260, Description = "代码生成表字段配置")]
|
||||
public class SysCodeGenColumnService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
private readonly CodeGenOptions _codeGenOptions;
|
||||
private readonly DbConnectionOptions _dbConnectionOptions;
|
||||
|
||||
public SysCodeGenColumnService(ISqlSugarClient db,
|
||||
IOptions<DbConnectionOptions> dbConnectionOptions,
|
||||
IOptions<CodeGenOptions> codeGenOptions)
|
||||
{
|
||||
_db = db;
|
||||
_dbConnectionOptions = dbConnectionOptions.Value;
|
||||
_codeGenOptions = codeGenOptions.Value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据表列(实体属性)集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task<List<ColumnOutput>> GetColumnList([FromQuery] BaseIdInput input)
|
||||
{
|
||||
var genTable = await _db.Queryable<SysCodeGenTable>().FirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002);
|
||||
|
||||
var entityType = GetEntityInfos().ConfigureAwait(false).GetAwaiter().GetResult().FirstOrDefault(u => u.EntityName == genTable.EntityName);
|
||||
if (entityType == null) return null;
|
||||
|
||||
var config = _dbConnectionOptions.ConnectionConfigs.FirstOrDefault(u => u.ConfigId.ToString() == genTable.ConfigId);
|
||||
var dbTableName = genTable.TableName;
|
||||
|
||||
int bracketIndex = dbTableName.IndexOf('{');
|
||||
if (bracketIndex != -1)
|
||||
{
|
||||
dbTableName = dbTableName[..bracketIndex];
|
||||
var dbTableInfos = _db.AsTenant().GetConnectionScope(genTable.ConfigId).DbMaintenance.GetTableInfoList(false);
|
||||
var table = dbTableInfos.FirstOrDefault(u => u.Name.StartsWith(config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(dbTableName) : dbTableName, StringComparison.CurrentCultureIgnoreCase));
|
||||
if (table != null) dbTableName = table.Name;
|
||||
}
|
||||
|
||||
// 切库---多库代码生成用
|
||||
var provider = _db.AsTenant().GetConnectionScope(!string.IsNullOrEmpty(genTable.ConfigId) ? genTable.ConfigId : SqlSugarConst.MainConfigId);
|
||||
|
||||
var entityBasePropertyNames = _codeGenOptions.EntityBaseColumn[nameof(EntityTenantBaseData)];
|
||||
var columnInfos = provider.DbMaintenance.GetColumnInfosByTableName(dbTableName, false);
|
||||
var result = columnInfos.Select(u => new ColumnOutput
|
||||
{
|
||||
ColumnName = u.DbColumnName,
|
||||
ColumnLength = u.Length,
|
||||
IsPrimarykey = u.IsPrimarykey,
|
||||
IsNullable = u.IsNullable,
|
||||
DataType = u.DataType,
|
||||
NetType = CodeGenHelper.ConvertDataType(u, provider.CurrentConnectionConfig.DbType),
|
||||
ColumnComment = string.IsNullOrWhiteSpace(u.ColumnDescription) ? u.DbColumnName : u.ColumnDescription,
|
||||
DefaultValue = u.DefaultValue,
|
||||
}).ToList();
|
||||
|
||||
// 获取实体的属性信息,赋值给PropertyName属性(CodeFirst模式应以PropertyName为实际使用名称)
|
||||
var entityProperties = entityType.Type.GetProperties();
|
||||
for (int i = result.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var columnOutput = result[i];
|
||||
// 先找自定义字段名的,如果找不到就再找自动生成字段名的(并且过滤掉没有SugarColumn的属性)
|
||||
var propertyInfo = entityProperties.FirstOrDefault(u => string.Equals((u.GetCustomAttribute<SugarColumn>()?.ColumnName ?? ""), columnOutput.ColumnName, StringComparison.CurrentCultureIgnoreCase)) ??
|
||||
entityProperties.FirstOrDefault(u => u.GetCustomAttribute<SugarColumn>() != null && u.Name.Equals(config!.DbSettings.EnableUnderLine
|
||||
? CodeGenHelper.CamelColumnName(columnOutput.ColumnName, entityBasePropertyNames).ToLower()
|
||||
: columnOutput.ColumnName.ToLower(), StringComparison.CurrentCultureIgnoreCase));
|
||||
if (propertyInfo != null)
|
||||
{
|
||||
columnOutput.PropertyName = propertyInfo.Name;
|
||||
columnOutput.ColumnComment = propertyInfo.GetCustomAttribute<SugarColumn>()!.ColumnDescription;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.RemoveAt(i); // 移除没有定义此属性的字段
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取库表信息
|
||||
/// </summary>
|
||||
/// <param name="excludeSysTable">是否排除带SysTable属性的表</param>
|
||||
/// <returns></returns>
|
||||
public async Task<IEnumerable<EntityInfo>> GetEntityInfos(bool excludeSysTable = false)
|
||||
{
|
||||
var types = new List<Type>();
|
||||
if (_codeGenOptions.EntityAssemblyNames != null)
|
||||
{
|
||||
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
|
||||
foreach (var assembly in assemblies)
|
||||
{
|
||||
var assemblyName = assembly.GetName().Name!;
|
||||
if (_codeGenOptions.EntityAssemblyNames.Contains(assemblyName) || _codeGenOptions.EntityAssemblyNames.Any(name => assemblyName.Contains(name)))
|
||||
{
|
||||
Assembly asm = Assembly.Load(assemblyName);
|
||||
types.AddRange(asm.GetExportedTypes().ToList());
|
||||
}
|
||||
}
|
||||
}
|
||||
var sugarTableType = typeof(SugarTable);
|
||||
bool IsMyAttribute(Attribute[] o)
|
||||
{
|
||||
foreach (Attribute a in o)
|
||||
{
|
||||
if (a.GetType() == sugarTableType)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Type[] cosType = types.Where(u => IsMyAttribute(Attribute.GetCustomAttributes(u, false))).ToArray();
|
||||
|
||||
var entityInfos = new List<EntityInfo>();
|
||||
foreach (var ct in cosType)
|
||||
{
|
||||
// 若实体贴[SysTable]特性,则禁止显示系统自带的
|
||||
if (excludeSysTable && ct.IsDefined(typeof(SysTableAttribute), false)) continue;
|
||||
|
||||
var des = ct.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||
var description = des.Length > 0 ? ((DescriptionAttribute)des[0]).Description : "";
|
||||
var sugarAttribute = ct.GetCustomAttributes(sugarTableType, true).FirstOrDefault();
|
||||
|
||||
entityInfos.Add(new EntityInfo()
|
||||
{
|
||||
EntityName = ct.Name,
|
||||
DbTableName = sugarAttribute == null ? ct.Name : ((SugarTable)sugarAttribute).TableName,
|
||||
TableDescription = sugarAttribute == null ? description : ((SugarTable)sugarAttribute).TableDescription,
|
||||
Type = ct
|
||||
});
|
||||
}
|
||||
return await Task.FromResult(entityInfos);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取代码生成配置列表 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取代码生成配置列表")]
|
||||
public async Task<List<CodeGenColumnConfig>> GetList([FromQuery] BaseIdInput input)
|
||||
{
|
||||
// 获取主表
|
||||
var codeGenTable = await _db.Queryable<SysCodeGenTable>().FirstAsync(u => u.Id == input.Id);
|
||||
|
||||
// 获取配置的字段
|
||||
var genConfigColumnList = await _db.Queryable<SysCodeGenColumn>().Where(u => u.CodeGenTableId == input.Id).ToListAsync();
|
||||
|
||||
// 获取实体所有字段
|
||||
var tableColumnList = await GetColumnList(new BaseIdInput { Id = input.Id });
|
||||
|
||||
// 获取新增的字段
|
||||
var addColumnList = tableColumnList.Where(u => !genConfigColumnList.Select(d => d.ColumnName).Contains(u.ColumnName)).ToList();
|
||||
|
||||
// 获取删除的字段
|
||||
var delColumnList = genConfigColumnList.Where(u => !tableColumnList.Select(d => d.ColumnName).Contains(u.ColumnName)).ToList();
|
||||
|
||||
// 获取更新的字段
|
||||
var updateColumnList = new List<SysCodeGenColumn>();
|
||||
foreach (var column in genConfigColumnList)
|
||||
{
|
||||
// 获取没有增减的
|
||||
if (tableColumnList.Any(u => u.ColumnName == column.ColumnName))
|
||||
{
|
||||
var nmd = tableColumnList.Single(u => u.ColumnName == column.ColumnName);
|
||||
// 如果数据库类型或者长度改变
|
||||
if (nmd.NetType != column.NetType || nmd.ColumnLength != column.ColumnLength || nmd.ColumnComment != column.ColumnComment)
|
||||
{
|
||||
column.NetType = nmd.NetType;
|
||||
column.ColumnLength = nmd.ColumnLength;
|
||||
column.ColumnComment = nmd.ColumnComment;
|
||||
updateColumnList.Add(column);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 增加新增的
|
||||
if (addColumnList.Count > 0) AddList(addColumnList, codeGenTable);
|
||||
|
||||
// 删除没有的
|
||||
if (delColumnList.Count > 0) await _db.Deleteable(delColumnList).ExecuteCommandAsync();
|
||||
|
||||
// 更新配置
|
||||
if (updateColumnList.Count > 0) await _db.Updateable(updateColumnList).ExecuteCommandAsync();
|
||||
|
||||
// 重新获取配置
|
||||
return await _db.Queryable<SysCodeGenColumn>()
|
||||
.Where(u => u.CodeGenTableId == input.Id)
|
||||
.Select<CodeGenColumnConfig>()
|
||||
.OrderBy(u => new { u.OrderNo, u.Id })
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新代码生成配置 🔖
|
||||
/// </summary>
|
||||
/// <param name="inputList"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "Update"), HttpPost]
|
||||
[DisplayName("更新代码生成配置")]
|
||||
public async Task UpdateCodeGenConfig(List<SysCodeGenColumn> inputList)
|
||||
{
|
||||
if (inputList == null || inputList.Count < 1) return;
|
||||
|
||||
await _db.Updateable(inputList)
|
||||
.IgnoreColumns(u => new
|
||||
{
|
||||
u.CodeGenTableId,
|
||||
u.ColumnLength,
|
||||
u.ColumnName,
|
||||
u.PropertyName,
|
||||
u.IsPrimarykey,
|
||||
u.IsCommon,
|
||||
})
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除代码生成配置
|
||||
/// </summary>
|
||||
/// <param name="tableId"></param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task DeleteCodeGenConfig(long tableId)
|
||||
{
|
||||
await _db.Deleteable<SysCodeGenColumn>().Where(u => u.CodeGenTableId == tableId).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取代码生成配置详情 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取代码生成配置详情")]
|
||||
public async Task<SysCodeGenColumn> GetDetail([FromQuery] CodeGenColumnConfig input)
|
||||
{
|
||||
return await _db.Queryable<SysCodeGenColumn>().SingleAsync(u => u.Id == input.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取默认列配置
|
||||
/// </summary>
|
||||
/// <param name="tableColumnOutputList"></param>
|
||||
/// <param name="codeGenTableId"></param>
|
||||
[NonAction]
|
||||
public List<SysCodeGenColumn> GetDefaultColumnConfigList(List<ColumnOutput> tableColumnOutputList, long codeGenTableId)
|
||||
{
|
||||
if (tableColumnOutputList == null) return null;
|
||||
var settings = new JsonSerializer { ContractResolver = new CamelCasePropertyNamesContractResolver() };
|
||||
|
||||
var orderNo = 1;
|
||||
var columnConfigList = new List<SysCodeGenColumn>();
|
||||
foreach (var tableColumn in tableColumnOutputList)
|
||||
{
|
||||
if (codeGenTableId > 0 && _db.Queryable<SysCodeGenColumn>().Any(u => u.ColumnName == tableColumn.ColumnName && u.CodeGenTableId == codeGenTableId))
|
||||
continue;
|
||||
|
||||
var columnConfig = new SysCodeGenColumn();
|
||||
var yesOrNo = !tableColumn.IsPrimarykey;
|
||||
if (CodeGenHelper.IsCommonColumn(tableColumn.PropertyName))
|
||||
{
|
||||
columnConfig.OrderNo = tableColumnOutputList.Count + orderNo;
|
||||
columnConfig.IsCommon = true;
|
||||
yesOrNo = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
columnConfig.IsQuery = true;
|
||||
columnConfig.IsCommon = false;
|
||||
columnConfig.OrderNo = orderNo;
|
||||
}
|
||||
|
||||
columnConfig.NetType = tableColumn.NetType;
|
||||
columnConfig.CodeGenTableId = codeGenTableId;
|
||||
columnConfig.ColumnName = tableColumn.ColumnName; // 字段名
|
||||
columnConfig.PropertyName = tableColumn.PropertyName; // 实体属性名
|
||||
columnConfig.ColumnLength = tableColumn.ColumnLength; // 长度
|
||||
columnConfig.IsPrimarykey = tableColumn.IsPrimarykey;
|
||||
columnConfig.ColumnComment = Regex.Replace(tableColumn.ColumnComment ?? "", @"(id|Id|ID)$", "");
|
||||
|
||||
// 是否必填验证
|
||||
columnConfig.IsQuery = yesOrNo;
|
||||
columnConfig.IsTable = yesOrNo;
|
||||
columnConfig.IsImport = yesOrNo;
|
||||
columnConfig.IsSortable = yesOrNo;
|
||||
columnConfig.IsAddUpdate = yesOrNo;
|
||||
columnConfig.DataType = tableColumn.DataType;
|
||||
columnConfig.QueryType = GetDefaultQueryType(columnConfig);
|
||||
columnConfig.DefaultValue = GetDefaultValue(tableColumn.DefaultValue);
|
||||
columnConfig.EffectType = CodeGenHelper.DataTypeToEff(columnConfig.NetType);
|
||||
var propertyType = Nullable.GetUnderlyingType(tableColumn.PropertyType ?? typeof(object)) ?? tableColumn.PropertyType;
|
||||
if (propertyType is { IsEnum: true }) // 枚举类型
|
||||
{
|
||||
columnConfig.EffectType = CodeGenEffectTypeEnum.EnumSelector;
|
||||
columnConfig.Config = new { Code = propertyType.Name }.ToJson();
|
||||
columnConfig.QueryType = "==";
|
||||
}
|
||||
else if (tableColumn.PropertyInfo.IsDefined(typeof(DictAttribute), true)) // 字段特性
|
||||
{
|
||||
var attribute = tableColumn.PropertyInfo.GetCustomAttribute<DictAttribute>();
|
||||
columnConfig.EffectType = CodeGenEffectTypeEnum.DictSelector;
|
||||
columnConfig.Config = new { Code = attribute?.DictTypeCode }.ToJson();
|
||||
columnConfig.QueryType = "==";
|
||||
}
|
||||
else if (tableColumn.PropertyInfo.IsDefined(typeof(ConstAttribute), true)) // 常量特性
|
||||
{
|
||||
var attribute = tableColumn.PropertyInfo.GetCustomAttribute<ConstAttribute>();
|
||||
columnConfig.EffectType = CodeGenEffectTypeEnum.DictSelector;
|
||||
columnConfig.Config = new { Code = attribute?.Name }.ToJson();
|
||||
columnConfig.QueryType = "==";
|
||||
}
|
||||
else
|
||||
{
|
||||
columnConfig.Config = null;
|
||||
}
|
||||
|
||||
if (columnConfig.EffectType == CodeGenEffectTypeEnum.DatePicker)
|
||||
{
|
||||
columnConfig.Config = new EffectDatePickerConfigInput { Format = "datetime" }.ToJson();
|
||||
}
|
||||
|
||||
// 是否是外键
|
||||
if (tableColumn.IsForeignKey)
|
||||
{
|
||||
// 设置外键配置
|
||||
if (tableColumn.ForeignProperty != null)
|
||||
{
|
||||
var fkEntityInfo = _db.EntityMaintenance.GetEntityInfoNoCache(tableColumn.ForeignEntityType);
|
||||
var fkConfigId = tableColumn.ForeignEntityType.GetCustomAttribute<TenantAttribute>()?.configId as string ?? SqlSugarConst.MainConfigId;
|
||||
var displayProperty = fkEntityInfo.Columns.FirstOrDefault(u => u.PropertyName.Contains("Name") && u.PropertyInfo.PropertyType.Name == "String");
|
||||
var pidProperty = fkEntityInfo.Columns.FirstOrDefault(u => u.PropertyName is "Pis" or "pid");
|
||||
columnConfig.EffectType = pidProperty != null ? CodeGenEffectTypeEnum.ApiTreeSelector : CodeGenEffectTypeEnum.ForeignKey;
|
||||
columnConfig.Config = new EffectTreeConfigInput
|
||||
{
|
||||
ConfigId = fkConfigId,
|
||||
LinkPropertyName = "Id",
|
||||
LinkPropertyType = "long?",
|
||||
EntityName = fkEntityInfo.EntityName,
|
||||
TableName = fkEntityInfo.DbTableName,
|
||||
TableComment = fkEntityInfo.TableDescription,
|
||||
DisplayPropertyNames = displayProperty?.PropertyName,
|
||||
ParentPropertyName = pidProperty?.PropertyName,
|
||||
ParentPropertyType = pidProperty?.PropertyInfo.PropertyType.Name,
|
||||
SearchPropertyName = displayProperty?.PropertyName,
|
||||
SearchPropertyType = displayProperty?.PropertyInfo.PropertyType.Name,
|
||||
}.ToJson();
|
||||
}
|
||||
}
|
||||
|
||||
columnConfig.IsRequired = columnConfig.IsRequired || columnConfig.IsPrimarykey || !tableColumn.IsNullable;
|
||||
columnConfigList.Add(columnConfig);
|
||||
orderNo += 1; // 每个配置排序间隔1
|
||||
}
|
||||
return columnConfigList.OrderBy(u => u.OrderNo).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量增加代码生成配置
|
||||
/// </summary>
|
||||
/// <param name="tableColumnOutputList"></param>
|
||||
/// <param name="codeGenTable"></param>
|
||||
[NonAction]
|
||||
public void AddList(List<ColumnOutput> tableColumnOutputList, SysCodeGenTable codeGenTable)
|
||||
{
|
||||
if (tableColumnOutputList == null) return;
|
||||
|
||||
var columnConfigList = new List<SysCodeGenColumn>();
|
||||
var orderNo = 1;
|
||||
foreach (var tableColumn in tableColumnOutputList)
|
||||
{
|
||||
if (_db.Queryable<SysCodeGenColumn>().Any(u => u.ColumnName == tableColumn.ColumnName && u.CodeGenTableId == codeGenTable.Id))
|
||||
continue;
|
||||
|
||||
var columnConfig = new SysCodeGenColumn();
|
||||
|
||||
var yesOrNo = !(tableColumn.IsPrimarykey || tableColumn.IsForeignKey);
|
||||
|
||||
if (CodeGenHelper.IsCommonColumn(tableColumn.PropertyName))
|
||||
{
|
||||
columnConfig.IsCommon = true;
|
||||
yesOrNo = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
columnConfig.IsCommon = false;
|
||||
}
|
||||
|
||||
columnConfig.CodeGenTableId = codeGenTable.Id;
|
||||
columnConfig.ColumnName = tableColumn.ColumnName; // 字段名
|
||||
columnConfig.PropertyName = tableColumn.PropertyName;// 实体属性名
|
||||
columnConfig.ColumnLength = tableColumn.ColumnLength;// 长度
|
||||
columnConfig.ColumnComment = tableColumn.ColumnComment;
|
||||
columnConfig.NetType = tableColumn.NetType;
|
||||
|
||||
// 是否必填验证
|
||||
columnConfig.IsQuery = false;
|
||||
columnConfig.IsTable = yesOrNo;
|
||||
columnConfig.IsAddUpdate = yesOrNo;
|
||||
|
||||
columnConfig.DataType = tableColumn.DataType;
|
||||
columnConfig.EffectType = CodeGenHelper.DataTypeToEff(columnConfig.NetType);
|
||||
columnConfig.QueryType = GetDefaultQueryType(columnConfig); // QueryTypeEnum.eq.ToString();
|
||||
columnConfig.DefaultValue = GetDefaultValue(tableColumn.DefaultValue);
|
||||
columnConfig.OrderNo = orderNo;
|
||||
columnConfigList.Add(columnConfig);
|
||||
|
||||
orderNo += 1; // 每个配置排序间隔1
|
||||
}
|
||||
// 多库代码生成---这里要切回主库
|
||||
var provider = _db.AsTenant().GetConnectionScope(SqlSugarConst.MainConfigId);
|
||||
provider.Insertable(columnConfigList).ExecuteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 默认查询类型
|
||||
/// </summary>
|
||||
/// <param name="columnConfig"></param>
|
||||
/// <returns></returns>
|
||||
private static string GetDefaultQueryType(SysCodeGenColumn columnConfig)
|
||||
{
|
||||
return (columnConfig.NetType?.TrimEnd('?')) switch
|
||||
{
|
||||
"string" => "like",
|
||||
"DateTime" => "~",
|
||||
_ => "==",
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取默认值
|
||||
/// </summary>
|
||||
/// <param name="dataValue"></param>
|
||||
/// <returns></returns>
|
||||
private static string? GetDefaultValue(string dataValue)
|
||||
{
|
||||
if (dataValue == null) return null;
|
||||
// 正则表达式模式
|
||||
// \( 和 \) 用来匹配字面量的括号
|
||||
// .+ 用来匹配一个或多个任意字符,但不包括换行符
|
||||
string pattern = @"\((.+)\)";//适合MSSQL其他数据库没有测试
|
||||
|
||||
// 使用 Regex 类进行匹配
|
||||
Match match = Regex.Match(dataValue, pattern);
|
||||
|
||||
string value;
|
||||
// 如果找到了匹配项
|
||||
if (match.Success)
|
||||
{
|
||||
// 提取括号内的值
|
||||
value = match.Groups[1].Value.Trim('\'');
|
||||
}
|
||||
else
|
||||
{
|
||||
value = dataValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@ -1,365 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 系统代码生成配置服务 🧩
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Order = 260, Description = "代码生成配置")]
|
||||
public class SysCodeGenConfigService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
private readonly CodeGenOptions _codeGenOptions;
|
||||
private readonly DbConnectionOptions _dbConnectionOptions;
|
||||
|
||||
public SysCodeGenConfigService(ISqlSugarClient db,
|
||||
IOptions<CodeGenOptions> codeGenOptions,
|
||||
IOptions<DbConnectionOptions> dbConnectionOptions)
|
||||
{
|
||||
_db = db;
|
||||
_codeGenOptions = codeGenOptions.Value;
|
||||
_dbConnectionOptions = dbConnectionOptions.Value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据表列(实体属性)集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取数据表列(实体属性)集合")]
|
||||
public List<ColumnOuput> GetColumnList([FromQuery] AddCodeGenInput input)
|
||||
{
|
||||
return GetColumnList(input.TableName, input.ConfigId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据表列(实体属性)集合
|
||||
/// </summary>
|
||||
/// <param name="EntityName"></param>
|
||||
/// <param name="ConfigId"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取数据表列(实体属性)集合")]
|
||||
public List<ColumnOuput> GetColumnList(string EntityName, string ConfigId)
|
||||
{
|
||||
var entityType = GetEntityInfos().GetAwaiter().GetResult().FirstOrDefault(u => u.EntityName == EntityName);
|
||||
if (entityType == null) return null;
|
||||
|
||||
var config = _dbConnectionOptions.ConnectionConfigs.FirstOrDefault(u => u.ConfigId.ToString() == ConfigId);
|
||||
var dbTableName = config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(entityType.DbTableName) : entityType.DbTableName;
|
||||
int bracketIndex = dbTableName.IndexOf('{');
|
||||
if (bracketIndex != -1)
|
||||
{
|
||||
dbTableName = dbTableName[..bracketIndex];
|
||||
var dbTableInfos = _db.AsTenant().GetConnectionScope(ConfigId).DbMaintenance.GetTableInfoList(false);
|
||||
var table = dbTableInfos.FirstOrDefault(u => u.Name.StartsWith(config.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(dbTableName) : dbTableName, StringComparison.CurrentCultureIgnoreCase));
|
||||
if (table != null)
|
||||
dbTableName = table.Name;
|
||||
}
|
||||
|
||||
// 切库---多库代码生成用
|
||||
var provider = _db.AsTenant().GetConnectionScope(!string.IsNullOrEmpty(ConfigId) ? ConfigId : SqlSugarConst.MainConfigId);
|
||||
|
||||
var entityBasePropertyNames = _codeGenOptions.EntityBaseColumn[nameof(EntityTenantBaseData)];
|
||||
var columnInfos = provider.DbMaintenance.GetColumnInfosByTableName(dbTableName, false);
|
||||
var result = columnInfos.Select(u => new ColumnOuput
|
||||
{
|
||||
// 转下划线后的列名需要再转回来(暂时不转)
|
||||
//ColumnName = config.DbSettings.EnableUnderLine ? CodeGenUtil.CamelColumnName(u.DbColumnName, entityBasePropertyNames) : u.DbColumnName,
|
||||
ColumnName = u.DbColumnName,
|
||||
ColumnLength = u.Length,
|
||||
IsPrimarykey = u.IsPrimarykey,
|
||||
IsNullable = u.IsNullable,
|
||||
ColumnKey = u.IsPrimarykey.ToString(),
|
||||
NetType = CodeGenHelper.ConvertDataType(u, provider.CurrentConnectionConfig.DbType),
|
||||
DataType = u.DataType,
|
||||
ColumnComment = string.IsNullOrWhiteSpace(u.ColumnDescription) ? u.DbColumnName : u.ColumnDescription,
|
||||
DefaultValue = u.DefaultValue,
|
||||
}).ToList();
|
||||
|
||||
// 获取实体的属性信息,赋值给PropertyName属性(CodeFirst模式应以PropertyName为实际使用名称)
|
||||
var entityProperties = entityType.Type.GetProperties();
|
||||
for (int i = result.Count - 1; i >= 0; i--)
|
||||
{
|
||||
var columnOutput = result[i];
|
||||
// 先找自定义字段名的,如果找不到就再找自动生成字段名的(并且过滤掉没有SugarColumn的属性)
|
||||
var propertyInfo = entityProperties.FirstOrDefault(u => (u.GetCustomAttribute<SugarColumn>()?.ColumnName ?? "").ToLower() == columnOutput.ColumnName.ToLower()) ??
|
||||
entityProperties.FirstOrDefault(u => u.GetCustomAttribute<SugarColumn>() != null && u.Name.ToLower() == (config.DbSettings.EnableUnderLine
|
||||
? CodeGenHelper.CamelColumnName(columnOutput.ColumnName, entityBasePropertyNames).ToLower()
|
||||
: columnOutput.ColumnName.ToLower()));
|
||||
if (propertyInfo != null)
|
||||
{
|
||||
columnOutput.PropertyName = propertyInfo.Name;
|
||||
columnOutput.ColumnComment = propertyInfo.GetCustomAttribute<SugarColumn>()!.ColumnDescription;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.RemoveAt(i); // 移除没有定义此属性的字段
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取库表信息
|
||||
/// </summary>
|
||||
/// <param name="excludeSysTable">是否排除带SysTable属性的表</param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取库表信息")]
|
||||
public async Task<IEnumerable<EntityInfo>> GetEntityInfos(bool excludeSysTable = false)
|
||||
{
|
||||
var types = new List<Type>();
|
||||
if (_codeGenOptions.EntityAssemblyNames != null)
|
||||
{
|
||||
types = App.EffectiveTypes.Where(u => u.IsClass).Where(u => _codeGenOptions.EntityAssemblyNames.Contains(u.Assembly.GetName().Name)
|
||||
|| _codeGenOptions.EntityAssemblyNames.Any(name => u.Assembly.GetName().Name!.Contains(name))).ToList();
|
||||
}
|
||||
|
||||
Type[] cosType = types.Where(u => u.IsDefined(typeof(SugarTable), false) && !u.GetCustomAttributes<IgnoreTableAttribute>().Any()).ToArray();
|
||||
var entityInfos = new List<EntityInfo>();
|
||||
foreach (var ct in cosType)
|
||||
{
|
||||
// 若实体贴[SysTable]特性,则禁止显示系统自带的
|
||||
if (excludeSysTable && ct.IsDefined(typeof(SysTableAttribute), false))
|
||||
continue;
|
||||
|
||||
var des = ct.GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||
var description = des.Length > 0 ? ((DescriptionAttribute)des[0]).Description : "";
|
||||
var sugarAttribute = ct.GetCustomAttributes(typeof(SugarTable), true).FirstOrDefault();
|
||||
|
||||
entityInfos.Add(new EntityInfo()
|
||||
{
|
||||
EntityName = ct.Name,
|
||||
DbTableName = sugarAttribute == null ? ct.Name : ((SugarTable)sugarAttribute).TableName,
|
||||
TableDescription = sugarAttribute == null ? description : ((SugarTable)sugarAttribute).TableDescription,
|
||||
Type = ct
|
||||
});
|
||||
}
|
||||
return await Task.FromResult(entityInfos);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取代码生成配置列表 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取代码生成配置列表")]
|
||||
public async Task<List<CodeGenConfig>> GetList([FromQuery] CodeGenConfig input)
|
||||
{
|
||||
// 获取主表
|
||||
var codeGenTable = _db.Queryable<SysCodeGen>().Single(u => u.Id == input.CodeGenId);
|
||||
// 获取配置的字段
|
||||
var genConfigColumnList = await _db.Queryable<SysCodeGenConfig>().Where(u => u.CodeGenId == input.CodeGenId).ToListAsync();
|
||||
// 获取实体所有字段
|
||||
var tableColumnList = GetColumnList(codeGenTable.TableName, codeGenTable.ConfigId);
|
||||
// 获取新增的字段
|
||||
var addColumnList = tableColumnList.Where(u => !genConfigColumnList.Select(d => d.ColumnName).Contains(u.ColumnName)).ToList();
|
||||
// 获取删除的字段
|
||||
var delColumnList = genConfigColumnList.Where(u => !tableColumnList.Select(d => d.ColumnName).Contains(u.ColumnName)).ToList();
|
||||
// 获取更新的字段
|
||||
var updateColumnList = new List<SysCodeGenConfig>();
|
||||
foreach (var column in genConfigColumnList)
|
||||
{
|
||||
// 获取没有增减的
|
||||
if (tableColumnList.Any(u => u.ColumnName == column.ColumnName))
|
||||
{
|
||||
var nmd = tableColumnList.Single(u => u.ColumnName == column.ColumnName);
|
||||
// 如果数据库类型或者长度改变
|
||||
if (nmd.NetType != column.NetType || nmd.ColumnLength != column.ColumnLength || nmd.ColumnComment != column.ColumnComment)
|
||||
{
|
||||
column.NetType = nmd.NetType;
|
||||
column.ColumnLength = nmd.ColumnLength;
|
||||
column.ColumnComment = nmd.ColumnComment;
|
||||
updateColumnList.Add(column);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 增加新增的
|
||||
if (addColumnList.Count > 0) AddList(addColumnList, codeGenTable);
|
||||
// 删除没有的
|
||||
if (delColumnList.Count > 0) await _db.Deleteable(delColumnList).ExecuteCommandAsync();
|
||||
// 更新配置
|
||||
if (updateColumnList.Count > 0) await _db.Updateable(updateColumnList).ExecuteCommandAsync();
|
||||
// 重新获取配置
|
||||
return await _db.Queryable<SysCodeGenConfig>()
|
||||
.Where(u => u.CodeGenId == input.CodeGenId)
|
||||
.Select<CodeGenConfig>()
|
||||
.Mapper(u =>
|
||||
{
|
||||
u.NetType = (u.EffectType is "EnumSelector" or "ConstSelector" ? u.DictTypeCode : u.NetType);
|
||||
})
|
||||
.OrderBy(u => new { u.OrderNo, u.Id })
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新代码生成配置 🔖
|
||||
/// </summary>
|
||||
/// <param name="inputList"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "Update"), HttpPost]
|
||||
[DisplayName("更新代码生成配置")]
|
||||
public async Task UpdateCodeGenConfig(List<CodeGenConfig> inputList)
|
||||
{
|
||||
if (inputList == null || inputList.Count < 1) return;
|
||||
|
||||
await _db.Updateable(inputList.Adapt<List<SysCodeGenConfig>>())
|
||||
.IgnoreColumns(u => new { u.ColumnLength, u.ColumnName, u.PropertyName })
|
||||
.ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除代码生成配置
|
||||
/// </summary>
|
||||
/// <param name="codeGenId"></param>
|
||||
/// <returns></returns>
|
||||
[NonAction]
|
||||
public async Task DeleteCodeGenConfig(long codeGenId)
|
||||
{
|
||||
await _db.Deleteable<SysCodeGenConfig>().Where(u => u.CodeGenId == codeGenId).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取代码生成配置详情 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取代码生成配置详情")]
|
||||
public async Task<SysCodeGenConfig> GetDetail([FromQuery] CodeGenConfig input)
|
||||
{
|
||||
return await _db.Queryable<SysCodeGenConfig>().SingleAsync(u => u.Id == input.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量增加代码生成配置
|
||||
/// </summary>
|
||||
/// <param name="tableColumnOutputList"></param>
|
||||
/// <param name="codeGenerate"></param>
|
||||
[NonAction]
|
||||
public void AddList(List<ColumnOuput> tableColumnOutputList, SysCodeGen codeGenerate)
|
||||
{
|
||||
if (tableColumnOutputList == null) return;
|
||||
|
||||
var codeGenConfigs = new List<SysCodeGenConfig>();
|
||||
var orderNo = 1;
|
||||
foreach (var tableColumn in tableColumnOutputList)
|
||||
{
|
||||
if (_db.Queryable<SysCodeGenConfig>().Any(u => u.ColumnName == tableColumn.ColumnName && u.CodeGenId == codeGenerate.Id))
|
||||
continue;
|
||||
|
||||
var codeGenConfig = new SysCodeGenConfig();
|
||||
|
||||
var YesOrNo = YesNoEnum.Y.ToString();
|
||||
if (Convert.ToBoolean(tableColumn.ColumnKey))
|
||||
{
|
||||
YesOrNo = YesNoEnum.N.ToString();
|
||||
}
|
||||
|
||||
if (CodeGenHelper.IsCommonColumn(tableColumn.PropertyName))
|
||||
{
|
||||
codeGenConfig.WhetherCommon = YesNoEnum.Y.ToString();
|
||||
YesOrNo = YesNoEnum.N.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
codeGenConfig.WhetherCommon = YesNoEnum.N.ToString();
|
||||
}
|
||||
|
||||
codeGenConfig.CodeGenId = codeGenerate.Id;
|
||||
codeGenConfig.ColumnName = tableColumn.ColumnName; // 字段名
|
||||
codeGenConfig.PropertyName = tableColumn.PropertyName;// 实体属性名
|
||||
codeGenConfig.ColumnLength = tableColumn.ColumnLength;// 长度
|
||||
codeGenConfig.ColumnComment = tableColumn.ColumnComment;
|
||||
codeGenConfig.NetType = tableColumn.NetType;
|
||||
codeGenConfig.WhetherRetract = YesNoEnum.N.ToString();
|
||||
|
||||
// 生成代码时,主键并不是必要输入项,故一定要排除主键字段
|
||||
//codeGenConfig.WhetherRequired = (tableColumn.IsNullable || tableColumn.IsPrimarykey) ? YesNoEnum.N.ToString() : YesNoEnum.Y.ToString();
|
||||
|
||||
#region 添加校验规则
|
||||
|
||||
// 添加校验规则
|
||||
codeGenConfig.Id = YitIdHelper.NextId();
|
||||
// 验证规则
|
||||
List<VerifyRuleItem> ruleItems = [];
|
||||
if (!tableColumn.IsNullable && !tableColumn.IsPrimarykey)
|
||||
{
|
||||
ruleItems.Add(new VerifyRuleItem()
|
||||
{
|
||||
Key = codeGenConfig.Id,
|
||||
Type = "required",
|
||||
Message = $"{tableColumn.ColumnComment}不能为空",
|
||||
});
|
||||
}
|
||||
codeGenConfig.WhetherRequired = ruleItems.Any(t => t.Type == "required") ? YesNoEnum.Y.ToString() : YesNoEnum.N.ToString();
|
||||
codeGenConfig.Rules = ruleItems.ToJson();
|
||||
|
||||
#endregion 添加校验规则
|
||||
|
||||
codeGenConfig.QueryWhether = YesNoEnum.N.ToString();
|
||||
codeGenConfig.WhetherAddUpdate = YesOrNo;
|
||||
codeGenConfig.WhetherTable = YesOrNo;
|
||||
|
||||
codeGenConfig.ColumnKey = tableColumn.ColumnKey;
|
||||
|
||||
codeGenConfig.DataType = tableColumn.DataType;
|
||||
codeGenConfig.EffectType = CodeGenHelper.DataTypeToEff(codeGenConfig.NetType);
|
||||
codeGenConfig.QueryType = GetDefaultQueryType(codeGenConfig); // QueryTypeEnum.eq.ToString();
|
||||
codeGenConfig.OrderNo = orderNo;
|
||||
codeGenConfig.DefaultValue = GetDefaultValue(tableColumn.DefaultValue);
|
||||
codeGenConfigs.Add(codeGenConfig);
|
||||
|
||||
orderNo += 1; // 每个配置排序间隔1
|
||||
}
|
||||
// 多库代码生成---这里要切回主库
|
||||
var provider = _db.AsTenant().GetConnectionScope(SqlSugarConst.MainConfigId);
|
||||
provider.Insertable(codeGenConfigs).ExecuteCommand();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 默认查询类型
|
||||
/// </summary>
|
||||
/// <param name="codeGenConfig"></param>
|
||||
/// <returns></returns>
|
||||
private static string GetDefaultQueryType(SysCodeGenConfig codeGenConfig)
|
||||
{
|
||||
return (codeGenConfig.NetType?.TrimEnd('?')) switch
|
||||
{
|
||||
"string" => "like",
|
||||
"DateTime" => "~",
|
||||
_ => "==",
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取默认值
|
||||
/// </summary>
|
||||
/// <param name="dataValue"></param>
|
||||
/// <returns></returns>
|
||||
private static string? GetDefaultValue(string dataValue)
|
||||
{
|
||||
if (dataValue == null) return null;
|
||||
// 正则表达式模式
|
||||
// \( 和 \) 用来匹配字面量的括号
|
||||
// .+ 用来匹配一个或多个任意字符,但不包括换行符
|
||||
string pattern = @"\((.+)\)";//适合MSSQL其他数据库没有测试
|
||||
|
||||
// 使用 Regex 类进行匹配
|
||||
Match match = Regex.Match(dataValue, pattern);
|
||||
|
||||
string value;
|
||||
// 如果找到了匹配项
|
||||
if (match.Success)
|
||||
{
|
||||
// 提取括号内的值
|
||||
value = match.Groups[1].Value.Trim('\'');
|
||||
}
|
||||
else
|
||||
{
|
||||
value = dataValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,31 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 系统代码生成模板配置服务 🧩
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Order = 260, Description = "代码生成模板配置")]
|
||||
public class SysCodeGenTemplateService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly SqlSugarRepository<SysCodeGenTemplate> _codeGenTemplateRep;
|
||||
|
||||
public SysCodeGenTemplateService(SqlSugarRepository<SysCodeGenTemplate> codeGenTemplateRep)
|
||||
{
|
||||
_codeGenTemplateRep = codeGenTemplateRep;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取代码生成模板配置列表 🔖
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取代码生成模板配置列表")]
|
||||
public async Task<List<SysCodeGenTemplate>> GetList()
|
||||
{
|
||||
return await _codeGenTemplateRep.AsQueryable().Select<SysCodeGenTemplate>().ToListAsync();
|
||||
}
|
||||
}
|
||||
@ -13,6 +13,22 @@ namespace Admin.NET.Core;
|
||||
/// </summary>
|
||||
public static class CodeGenHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// .NET与前端类型映射表
|
||||
/// </summary>
|
||||
private static readonly Dictionary<string, string> NetToTypeScriptMap = new() {
|
||||
{ "bool", "boolean" },
|
||||
{ "int", "number" },
|
||||
{ "long", "number" },
|
||||
{ "double", "number" },
|
||||
{ "float", "number" },
|
||||
{ "decimal", "number" },
|
||||
{ "byte", "number" },
|
||||
{ "datetime", "string" },
|
||||
{ "guid", "string" },
|
||||
{ "string", "string" },
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// 转换大驼峰法命名
|
||||
/// </summary>
|
||||
@ -179,21 +195,18 @@ public static class CodeGenHelper
|
||||
/// </summary>
|
||||
/// <param name="dataType"></param>
|
||||
/// <returns></returns>
|
||||
public static string DataTypeToEff(string dataType)
|
||||
public static CodeGenEffectTypeEnum DataTypeToEff(string dataType)
|
||||
{
|
||||
if (string.IsNullOrEmpty(dataType)) return "";
|
||||
return dataType?.TrimEnd('?') switch
|
||||
{
|
||||
"string" => "Input",
|
||||
"int" => "InputNumber",
|
||||
"long" => "InputNumber",
|
||||
"float" => "InputNumber",
|
||||
"double" => "InputNumber",
|
||||
"decimal" => "InputNumber",
|
||||
"bool" => "Switch",
|
||||
"Guid" => "Input",
|
||||
"DateTime" => "DatePicker",
|
||||
_ => "Input",
|
||||
"int" => CodeGenEffectTypeEnum.InputNumber,
|
||||
"long" => CodeGenEffectTypeEnum.InputNumber,
|
||||
"float" => CodeGenEffectTypeEnum.InputNumber,
|
||||
"double" => CodeGenEffectTypeEnum.InputNumber,
|
||||
"decimal" => CodeGenEffectTypeEnum.InputNumber,
|
||||
"DateTime" => CodeGenEffectTypeEnum.DatePicker,
|
||||
"bool" => CodeGenEffectTypeEnum.Switch,
|
||||
_ => CodeGenEffectTypeEnum.Input,
|
||||
};
|
||||
}
|
||||
|
||||
@ -215,4 +228,35 @@ public static class CodeGenHelper
|
||||
};
|
||||
return columnList.Contains(columnName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据库中真实名称
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="config"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetRealName(string name, DbConnectionConfig config)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(name)) return null;
|
||||
string realName = config!.DbSettings.EnableUnderLine ? UtilMethods.ToUnderLine(name) : name;
|
||||
if (config.DbType == DbType.PostgreSQL) realName = realName.ToLower();
|
||||
return realName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取前端类型
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>脚本
|
||||
public static string GetTypeScriptType(string type)
|
||||
{
|
||||
type = type?.Trim().TrimEnd('?').ToLower();
|
||||
if (string.IsNullOrWhiteSpace(type)) return "";
|
||||
|
||||
// 判断是否为枚举
|
||||
if (type.EndsWith(nameof(Enum))) return "number";
|
||||
|
||||
// 其他类型从类型映射表中取
|
||||
return NetToTypeScriptMap.TryGetValue(type, out var result) ? result : "any";
|
||||
}
|
||||
}
|
||||
@ -4,6 +4,8 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Admin.NET.Plugin.GoView.Service;
|
||||
|
||||
/// <summary>
|
||||
@ -77,9 +79,9 @@ public class GoViewSysService : IDynamicApiController
|
||||
/// GoView 退出 🔖
|
||||
/// </summary>
|
||||
[DisplayName("GoView 退出")]
|
||||
public void GetLogout()
|
||||
public async Task GetLogout()
|
||||
{
|
||||
_sysAuthService.Logout();
|
||||
await Task.FromResult(_sysAuthService.Logout());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -20,12 +20,10 @@ export * from './apis/sys-alipay-api';
|
||||
export * from './apis/sys-auth-api';
|
||||
export * from './apis/sys-cache-api';
|
||||
export * from './apis/sys-code-gen-api';
|
||||
export * from './apis/sys-code-gen-config-api';
|
||||
export * from './apis/sys-code-gen-template-api';
|
||||
export * from './apis/sys-code-gen-column-api';
|
||||
export * from './apis/sys-column-custom-api';
|
||||
export * from './apis/sys-common-api';
|
||||
export * from './apis/sys-config-api';
|
||||
export * from './apis/sys-config-tenant-api';
|
||||
export * from './apis/sys-const-api';
|
||||
export * from './apis/sys-database-api';
|
||||
export * from './apis/sys-db-backup-api';
|
||||
|
||||
@ -373,7 +373,7 @@ export const SysAuthApiAxiosParamCreator = function (configuration?: Configurati
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取当前登陆用户信息 🔖
|
||||
* @summary 获取登录账号 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -521,7 +521,7 @@ export const SysAuthApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取当前登陆用户信息 🔖
|
||||
* @summary 获取登录账号 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -611,7 +611,7 @@ export const SysAuthApiFactory = function (configuration?: Configuration, basePa
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取当前登陆用户信息 🔖
|
||||
* @summary 获取登录账号 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -705,7 +705,7 @@ export class SysAuthApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取当前登陆用户信息 🔖
|
||||
* @summary 获取登录账号 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysAuthApi
|
||||
|
||||
@ -19,16 +19,18 @@ import { Configuration } from '../configuration';
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
||||
import { AddCodeGenInput } from '../models';
|
||||
import { AdminNETResultDictionaryStringString } from '../models';
|
||||
import { AdminNETResultListColumnOuput } from '../models';
|
||||
import { AdminNETResultListColumnOutput } from '../models';
|
||||
import { AdminNETResultListDatabaseOutput } from '../models';
|
||||
import { AdminNETResultListString } from '../models';
|
||||
import { AdminNETResultListSysCodeGenColumn } from '../models';
|
||||
import { AdminNETResultListTableOutput } from '../models';
|
||||
import { AdminNETResultObject } from '../models';
|
||||
import { AdminNETResultSqlSugarPagedListSysCodeGen } from '../models';
|
||||
import { AdminNETResultSysCodeGen } from '../models';
|
||||
import { DeleteCodeGenInput } from '../models';
|
||||
import { AdminNETResultSysCodeGenTable } from '../models';
|
||||
import { BaseIdInput } from '../models';
|
||||
import { DefaultColumnConfigInput } from '../models';
|
||||
import { PageCodeGenInput } from '../models';
|
||||
import { SysCodeGen } from '../models';
|
||||
import { UpdateCodeGenInput } from '../models';
|
||||
/**
|
||||
* SysCodeGenApi - axios parameter creator
|
||||
@ -184,7 +186,7 @@ export const SysCodeGenApiAxiosParamCreator = function (configuration?: Configur
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取数据库库集合 🔖
|
||||
* @summary 获取数据库集合 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -227,12 +229,60 @@ export const SysCodeGenApiAxiosParamCreator = function (configuration?: Configur
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除代码生成 🔖
|
||||
* @param {Array<DeleteCodeGenInput>} [body]
|
||||
* @summary 获取默认表字段配置列表 🔖
|
||||
* @param {DefaultColumnConfigInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCodeGenDeletePost: async (body?: Array<DeleteCodeGenInput>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
apiSysCodeGenDefaultColumnConfigListPost: async (body?: DefaultColumnConfigInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCodeGen/defaultColumnConfigList`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCodeGenDeletePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCodeGen/delete`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
@ -276,7 +326,7 @@ export const SysCodeGenApiAxiosParamCreator = function (configuration?: Configur
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成详情 🔖
|
||||
* @param {number} id 代码生成器Id
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -325,6 +375,54 @@ export const SysCodeGenApiAxiosParamCreator = function (configuration?: Configur
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCodeGenGeneratePost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCodeGen/generate`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成分页列表 🔖
|
||||
@ -376,11 +474,11 @@ export const SysCodeGenApiAxiosParamCreator = function (configuration?: Configur
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成预览 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCodeGenPreviewPost: async (body?: SysCodeGen, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
apiSysCodeGenPreviewPost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCodeGen/preview`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
@ -423,13 +521,56 @@ export const SysCodeGenApiAxiosParamCreator = function (configuration?: Configur
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @summary 获取快捷设置外键配置 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCodeGenRunLocalPost: async (body?: SysCodeGen, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCodeGen/runLocal`;
|
||||
apiSysCodeGenQuickConfigMapGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCodeGen/quickConfigMap`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 同步代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCodeGenSyncPost: async (body?: BaseIdInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCodeGen/sync`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
@ -469,6 +610,58 @@ export const SysCodeGenApiAxiosParamCreator = function (configuration?: Configur
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成表详情 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCodeGenTableDetailGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysCodeGenTableDetailGet.');
|
||||
}
|
||||
const localVarPath = `/api/sysCodeGen/tableDetail`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取数据库表(实体)集合 🔖
|
||||
@ -610,7 +803,7 @@ export const SysCodeGenApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenColumnListByTableNameTableNameConfigIdGet(tableName: string, configId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListColumnOuput>>> {
|
||||
async apiSysCodeGenColumnListByTableNameTableNameConfigIdGet(tableName: string, configId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListColumnOutput>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenApiAxiosParamCreator(configuration).apiSysCodeGenColumnListByTableNameTableNameConfigIdGet(tableName, configId, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
@ -619,7 +812,7 @@ export const SysCodeGenApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取数据库库集合 🔖
|
||||
* @summary 获取数据库集合 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -632,12 +825,26 @@ export const SysCodeGenApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除代码生成 🔖
|
||||
* @param {Array<DeleteCodeGenInput>} [body]
|
||||
* @summary 获取默认表字段配置列表 🔖
|
||||
* @param {DefaultColumnConfigInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenDeletePost(body?: Array<DeleteCodeGenInput>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
async apiSysCodeGenDefaultColumnConfigListPost(body?: DefaultColumnConfigInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListSysCodeGenColumn>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenApiAxiosParamCreator(configuration).apiSysCodeGenDefaultColumnConfigListPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenApiAxiosParamCreator(configuration).apiSysCodeGenDeletePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
@ -647,7 +854,7 @@ export const SysCodeGenApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成详情 🔖
|
||||
* @param {number} id 代码生成器Id
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -658,6 +865,20 @@ export const SysCodeGenApiFp = function(configuration?: Configuration) {
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenGeneratePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultObject>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenApiAxiosParamCreator(configuration).apiSysCodeGenGeneratePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成分页列表 🔖
|
||||
@ -675,11 +896,11 @@ export const SysCodeGenApiFp = function(configuration?: Configuration) {
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成预览 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenPreviewPost(body?: SysCodeGen, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultDictionaryStringString>>> {
|
||||
async apiSysCodeGenPreviewPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultDictionaryStringString>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenApiAxiosParamCreator(configuration).apiSysCodeGenPreviewPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
@ -688,13 +909,40 @@ export const SysCodeGenApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @summary 获取快捷设置外键配置 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenRunLocalPost(body?: SysCodeGen, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultObject>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenApiAxiosParamCreator(configuration).apiSysCodeGenRunLocalPost(body, options);
|
||||
async apiSysCodeGenQuickConfigMapGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultObject>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenApiAxiosParamCreator(configuration).apiSysCodeGenQuickConfigMapGet(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 同步代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenSyncPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenApiAxiosParamCreator(configuration).apiSysCodeGenSyncPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成表详情 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenTableDetailGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSysCodeGenTable>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenApiAxiosParamCreator(configuration).apiSysCodeGenTableDetailGet(id, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -764,12 +1012,12 @@ export const SysCodeGenApiFactory = function (configuration?: Configuration, bas
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenColumnListByTableNameTableNameConfigIdGet(tableName: string, configId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListColumnOuput>> {
|
||||
async apiSysCodeGenColumnListByTableNameTableNameConfigIdGet(tableName: string, configId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListColumnOutput>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenColumnListByTableNameTableNameConfigIdGet(tableName, configId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取数据库库集合 🔖
|
||||
* @summary 获取数据库集合 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -778,24 +1026,44 @@ export const SysCodeGenApiFactory = function (configuration?: Configuration, bas
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除代码生成 🔖
|
||||
* @param {Array<DeleteCodeGenInput>} [body]
|
||||
* @summary 获取默认表字段配置列表 🔖
|
||||
* @param {DefaultColumnConfigInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenDeletePost(body?: Array<DeleteCodeGenInput>, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
async apiSysCodeGenDefaultColumnConfigListPost(body?: DefaultColumnConfigInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListSysCodeGenColumn>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenDefaultColumnConfigListPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenDeletePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成详情 🔖
|
||||
* @param {number} id 代码生成器Id
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenDetailGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSysCodeGen>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenDetailGet(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenGeneratePost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultObject>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenGeneratePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成分页列表 🔖
|
||||
@ -809,22 +1077,41 @@ export const SysCodeGenApiFactory = function (configuration?: Configuration, bas
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成预览 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenPreviewPost(body?: SysCodeGen, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultDictionaryStringString>> {
|
||||
async apiSysCodeGenPreviewPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultDictionaryStringString>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenPreviewPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @summary 获取快捷设置外键配置 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenRunLocalPost(body?: SysCodeGen, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultObject>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenRunLocalPost(body, options).then((request) => request(axios, basePath));
|
||||
async apiSysCodeGenQuickConfigMapGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultObject>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenQuickConfigMapGet(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 同步代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenSyncPost(body?: BaseIdInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenSyncPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成表详情 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenTableDetailGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSysCodeGenTable>> {
|
||||
return SysCodeGenApiFp(configuration).apiSysCodeGenTableDetailGet(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -886,12 +1173,12 @@ export class SysCodeGenApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
*/
|
||||
public async apiSysCodeGenColumnListByTableNameTableNameConfigIdGet(tableName: string, configId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListColumnOuput>> {
|
||||
public async apiSysCodeGenColumnListByTableNameTableNameConfigIdGet(tableName: string, configId: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListColumnOutput>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenColumnListByTableNameTableNameConfigIdGet(tableName, configId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取数据库库集合 🔖
|
||||
* @summary 获取数据库集合 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
@ -901,19 +1188,30 @@ export class SysCodeGenApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 删除代码生成 🔖
|
||||
* @param {Array<DeleteCodeGenInput>} [body]
|
||||
* @summary 获取默认表字段配置列表 🔖
|
||||
* @param {DefaultColumnConfigInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
*/
|
||||
public async apiSysCodeGenDeletePost(body?: Array<DeleteCodeGenInput>, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
public async apiSysCodeGenDefaultColumnConfigListPost(body?: DefaultColumnConfigInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListSysCodeGenColumn>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenDefaultColumnConfigListPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 删除代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
*/
|
||||
public async apiSysCodeGenDeletePost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenDeletePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成详情 🔖
|
||||
* @param {number} id 代码生成器Id
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
@ -921,6 +1219,17 @@ export class SysCodeGenApi extends BaseAPI {
|
||||
public async apiSysCodeGenDetailGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSysCodeGen>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenDetailGet(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
*/
|
||||
public async apiSysCodeGenGeneratePost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultObject>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenGeneratePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成分页列表 🔖
|
||||
@ -935,24 +1244,45 @@ export class SysCodeGenApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成预览 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
*/
|
||||
public async apiSysCodeGenPreviewPost(body?: SysCodeGen, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultDictionaryStringString>> {
|
||||
public async apiSysCodeGenPreviewPost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultDictionaryStringString>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenPreviewPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 执行代码生成 🔖
|
||||
* @param {SysCodeGen} [body]
|
||||
* @summary 获取快捷设置外键配置 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
*/
|
||||
public async apiSysCodeGenRunLocalPost(body?: SysCodeGen, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultObject>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenRunLocalPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
public async apiSysCodeGenQuickConfigMapGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultObject>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenQuickConfigMapGet(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 同步代码生成 🔖
|
||||
* @param {BaseIdInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
*/
|
||||
public async apiSysCodeGenSyncPost(body?: BaseIdInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenSyncPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成表详情 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenApi
|
||||
*/
|
||||
public async apiSysCodeGenTableDetailGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSysCodeGenTable>> {
|
||||
return SysCodeGenApiFp(this.configuration).apiSysCodeGenTableDetailGet(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
||||
1077
Web/src/api-services/system/apis/sys-code-gen-column-api.ts
Normal file
1077
Web/src/api-services/system/apis/sys-code-gen-column-api.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,130 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { Configuration } from '../configuration';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
||||
import { AdminNETResultListSysCodeGenTemplate } from '../models';
|
||||
/**
|
||||
* SysCodeGenTemplateApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const SysCodeGenTemplateApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成模板配置列表 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCodeGenTemplateListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCodeGenTemplate/list`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SysCodeGenTemplateApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const SysCodeGenTemplateApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成模板配置列表 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenTemplateListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListSysCodeGenTemplate>>> {
|
||||
const localVarAxiosArgs = await SysCodeGenTemplateApiAxiosParamCreator(configuration).apiSysCodeGenTemplateListGet(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SysCodeGenTemplateApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const SysCodeGenTemplateApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成模板配置列表 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCodeGenTemplateListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListSysCodeGenTemplate>> {
|
||||
return SysCodeGenTemplateApiFp(configuration).apiSysCodeGenTemplateListGet(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* SysCodeGenTemplateApi - object-oriented interface
|
||||
* @export
|
||||
* @class SysCodeGenTemplateApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class SysCodeGenTemplateApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary 获取代码生成模板配置列表 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCodeGenTemplateApi
|
||||
*/
|
||||
public async apiSysCodeGenTemplateListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListSysCodeGenTemplate>> {
|
||||
return SysCodeGenTemplateApiFp(this.configuration).apiSysCodeGenTemplateListGet(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -31,59 +31,6 @@ import { StressTestInput } from '../models';
|
||||
*/
|
||||
export const SysCommonApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有接口/动态API 🔖
|
||||
* @param {string} [groupName]
|
||||
* @param {boolean} [isAppApi]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCommonApiListGet: async (groupName?: string, isAppApi?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCommon/apiList`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
if (groupName !== undefined) {
|
||||
localVarQueryParameter['groupName'] = groupName;
|
||||
}
|
||||
|
||||
if (isAppApi !== undefined) {
|
||||
localVarQueryParameter['isAppApi'] = isAppApi;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有移动端接口 🔖
|
||||
@ -558,6 +505,49 @@ export const SysCommonApiAxiosParamCreator = function (configuration?: Configura
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有接口/动态API 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysCommonSysAllApiListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysCommon/sysAllApiList`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
@ -572,21 +562,6 @@ export const SysCommonApiAxiosParamCreator = function (configuration?: Configura
|
||||
*/
|
||||
export const SysCommonApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有接口/动态API 🔖
|
||||
* @param {string} [groupName]
|
||||
* @param {boolean} [isAppApi]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCommonApiListGet(groupName?: string, isAppApi?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListApiOutput>>> {
|
||||
const localVarAxiosArgs = await SysCommonApiAxiosParamCreator(configuration).apiSysCommonApiListGet(groupName, isAppApi, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有移动端接口 🔖
|
||||
@ -726,6 +701,19 @@ export const SysCommonApiFp = function(configuration?: Configuration) {
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有接口/动态API 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCommonSysAllApiListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListApiOutput>>> {
|
||||
const localVarAxiosArgs = await SysCommonApiAxiosParamCreator(configuration).apiSysCommonSysAllApiListGet(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@ -735,17 +723,6 @@ export const SysCommonApiFp = function(configuration?: Configuration) {
|
||||
*/
|
||||
export const SysCommonApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有接口/动态API 🔖
|
||||
* @param {string} [groupName]
|
||||
* @param {boolean} [isAppApi]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCommonApiListGet(groupName?: string, isAppApi?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListApiOutput>> {
|
||||
return SysCommonApiFp(configuration).apiSysCommonApiListGet(groupName, isAppApi, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有移动端接口 🔖
|
||||
@ -845,6 +822,15 @@ export const SysCommonApiFactory = function (configuration?: Configuration, base
|
||||
async apiSysCommonStressTestPost(body?: StressTestInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultStressTestHarnessResult>> {
|
||||
return SysCommonApiFp(configuration).apiSysCommonStressTestPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有接口/动态API 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysCommonSysAllApiListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListApiOutput>> {
|
||||
return SysCommonApiFp(configuration).apiSysCommonSysAllApiListGet(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@ -855,18 +841,6 @@ export const SysCommonApiFactory = function (configuration?: Configuration, base
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class SysCommonApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有接口/动态API 🔖
|
||||
* @param {string} [groupName]
|
||||
* @param {boolean} [isAppApi]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCommonApi
|
||||
*/
|
||||
public async apiSysCommonApiListGet(groupName?: string, isAppApi?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListApiOutput>> {
|
||||
return SysCommonApiFp(this.configuration).apiSysCommonApiListGet(groupName, isAppApi, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有移动端接口 🔖
|
||||
@ -976,4 +950,14 @@ export class SysCommonApi extends BaseAPI {
|
||||
public async apiSysCommonStressTestPost(body?: StressTestInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultStressTestHarnessResult>> {
|
||||
return SysCommonApiFp(this.configuration).apiSysCommonStressTestPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取所有接口/动态API 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysCommonApi
|
||||
*/
|
||||
public async apiSysCommonSysAllApiListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListApiOutput>> {
|
||||
return SysCommonApiFp(this.configuration).apiSysCommonSysAllApiListGet(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,891 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||
import { Configuration } from '../configuration';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
||||
import { AddConfigTenantInput } from '../models';
|
||||
import { AdminNETResultListString } from '../models';
|
||||
import { AdminNETResultListSysConfigTenant } from '../models';
|
||||
import { AdminNETResultSqlSugarPagedListSysConfigTenant } from '../models';
|
||||
import { AdminNETResultString } from '../models';
|
||||
import { AdminNETResultSysConfigTenant } from '../models';
|
||||
import { BatchConfigTenantInput } from '../models';
|
||||
import { DeleteConfigTenantInput } from '../models';
|
||||
import { PageConfigTenantInput } from '../models';
|
||||
import { UpdateConfigTenantInput } from '../models';
|
||||
/**
|
||||
* SysConfigTenantApi - axios parameter creator
|
||||
* @export
|
||||
*/
|
||||
export const SysConfigTenantApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 增加配置参数 🔖
|
||||
* @param {AddConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantAddPost: async (body?: AddConfigTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysConfigTenant/add`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 批量删除配置参数 🔖
|
||||
* @param {Array<number>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantBatchDeletePost: async (body?: Array<number>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysConfigTenant/batchDelete`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 批量更新配置参数值 🔖
|
||||
* @param {Array<BatchConfigTenantInput>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantBatchUpdatePost: async (body?: Array<BatchConfigTenantInput>, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysConfigTenant/batchUpdate`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据Code获取配置参数值 🔖
|
||||
* @param {string} code
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantConfigValueByCodeCodeGet: async (code: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'code' is not null or undefined
|
||||
if (code === null || code === undefined) {
|
||||
throw new RequiredError('code','Required parameter code was null or undefined when calling apiSysConfigTenantConfigValueByCodeCodeGet.');
|
||||
}
|
||||
const localVarPath = `/api/sysConfigTenant/configValueByCode/{code}`
|
||||
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除配置参数 🔖
|
||||
* @param {DeleteConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantDeletePost: async (body?: DeleteConfigTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysConfigTenant/delete`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数详情 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantDetailGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysConfigTenantDetailGet.');
|
||||
}
|
||||
const localVarPath = `/api/sysConfigTenant/detail`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取分组列表 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantGroupListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysConfigTenant/groupList`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数列表 🔖
|
||||
* @param {PageConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantListPost: async (body?: PageConfigTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysConfigTenant/list`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数分页列表 🔖
|
||||
* @param {PageConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantPagePost: async (body?: PageConfigTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysConfigTenant/page`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新配置参数 🔖
|
||||
* @param {UpdateConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysConfigTenantUpdatePost: async (body?: UpdateConfigTenantInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysConfigTenant/update`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication Bearer required
|
||||
// http bearer authentication required
|
||||
if (configuration && configuration.accessToken) {
|
||||
const accessToken = typeof configuration.accessToken === 'function'
|
||||
? await configuration.accessToken()
|
||||
: await configuration.accessToken;
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
query.set(key, localVarQueryParameter[key]);
|
||||
}
|
||||
for (const key in options.params) {
|
||||
query.set(key, options.params[key]);
|
||||
}
|
||||
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SysConfigTenantApi - functional programming interface
|
||||
* @export
|
||||
*/
|
||||
export const SysConfigTenantApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 增加配置参数 🔖
|
||||
* @param {AddConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantAddPost(body?: AddConfigTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantAddPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 批量删除配置参数 🔖
|
||||
* @param {Array<number>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantBatchDeletePost(body?: Array<number>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantBatchDeletePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 批量更新配置参数值 🔖
|
||||
* @param {Array<BatchConfigTenantInput>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantBatchUpdatePost(body?: Array<BatchConfigTenantInput>, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantBatchUpdatePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据Code获取配置参数值 🔖
|
||||
* @param {string} code
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantConfigValueByCodeCodeGet(code: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultString>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantConfigValueByCodeCodeGet(code, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除配置参数 🔖
|
||||
* @param {DeleteConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantDeletePost(body?: DeleteConfigTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantDeletePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数详情 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantDetailGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSysConfigTenant>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantDetailGet(id, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取分组列表 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantGroupListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListString>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantGroupListGet(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数列表 🔖
|
||||
* @param {PageConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantListPost(body?: PageConfigTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListSysConfigTenant>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantListPost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数分页列表 🔖
|
||||
* @param {PageConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantPagePost(body?: PageConfigTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSqlSugarPagedListSysConfigTenant>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantPagePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新配置参数 🔖
|
||||
* @param {UpdateConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantUpdatePost(body?: UpdateConfigTenantInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysConfigTenantApiAxiosParamCreator(configuration).apiSysConfigTenantUpdatePost(body, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SysConfigTenantApi - factory interface
|
||||
* @export
|
||||
*/
|
||||
export const SysConfigTenantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 增加配置参数 🔖
|
||||
* @param {AddConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantAddPost(body?: AddConfigTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantAddPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 批量删除配置参数 🔖
|
||||
* @param {Array<number>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantBatchDeletePost(body?: Array<number>, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantBatchDeletePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 批量更新配置参数值 🔖
|
||||
* @param {Array<BatchConfigTenantInput>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantBatchUpdatePost(body?: Array<BatchConfigTenantInput>, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantBatchUpdatePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据Code获取配置参数值 🔖
|
||||
* @param {string} code
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantConfigValueByCodeCodeGet(code: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultString>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantConfigValueByCodeCodeGet(code, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除配置参数 🔖
|
||||
* @param {DeleteConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantDeletePost(body?: DeleteConfigTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantDeletePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数详情 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantDetailGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSysConfigTenant>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantDetailGet(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取分组列表 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantGroupListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListString>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantGroupListGet(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数列表 🔖
|
||||
* @param {PageConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantListPost(body?: PageConfigTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListSysConfigTenant>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantListPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数分页列表 🔖
|
||||
* @param {PageConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantPagePost(body?: PageConfigTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSqlSugarPagedListSysConfigTenant>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantPagePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新配置参数 🔖
|
||||
* @param {UpdateConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysConfigTenantUpdatePost(body?: UpdateConfigTenantInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(configuration).apiSysConfigTenantUpdatePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* SysConfigTenantApi - object-oriented interface
|
||||
* @export
|
||||
* @class SysConfigTenantApi
|
||||
* @extends {BaseAPI}
|
||||
*/
|
||||
export class SysConfigTenantApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary 增加配置参数 🔖
|
||||
* @param {AddConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantAddPost(body?: AddConfigTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantAddPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 批量删除配置参数 🔖
|
||||
* @param {Array<number>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantBatchDeletePost(body?: Array<number>, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantBatchDeletePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 批量更新配置参数值 🔖
|
||||
* @param {Array<BatchConfigTenantInput>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantBatchUpdatePost(body?: Array<BatchConfigTenantInput>, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantBatchUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 根据Code获取配置参数值 🔖
|
||||
* @param {string} code
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantConfigValueByCodeCodeGet(code: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultString>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantConfigValueByCodeCodeGet(code, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 删除配置参数 🔖
|
||||
* @param {DeleteConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantDeletePost(body?: DeleteConfigTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantDeletePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数详情 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantDetailGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSysConfigTenant>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantDetailGet(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取分组列表 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantGroupListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListString>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantGroupListGet(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数列表 🔖
|
||||
* @param {PageConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantListPost(body?: PageConfigTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListSysConfigTenant>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantListPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取配置参数分页列表 🔖
|
||||
* @param {PageConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantPagePost(body?: PageConfigTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSqlSugarPagedListSysConfigTenant>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantPagePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 更新配置参数 🔖
|
||||
* @param {UpdateConfigTenantInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysConfigTenantApi
|
||||
*/
|
||||
public async apiSysConfigTenantUpdatePost(body?: UpdateConfigTenantInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysConfigTenantApiFp(this.configuration).apiSysConfigTenantUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
@ -34,7 +34,6 @@ import { RoleMenuInput } from '../models';
|
||||
import { RoleOrgInput } from '../models';
|
||||
import { RoleTableInput } from '../models';
|
||||
import { RoleUserInput } from '../models';
|
||||
import { StatusEnum } from '../models';
|
||||
import { UpdateRoleInput } from '../models';
|
||||
/**
|
||||
* SysRoleApi - axios parameter creator
|
||||
@ -516,11 +515,10 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
*
|
||||
* @summary 根据角色Id获取菜单Id集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysRoleOwnMenuListGet: async (id: number, status?: StatusEnum, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
apiSysRoleOwnMenuListGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysRoleOwnMenuListGet.');
|
||||
@ -545,10 +543,6 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
if (status !== undefined) {
|
||||
localVarQueryParameter['Status'] = status;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
@ -573,11 +567,10 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
*
|
||||
* @summary 根据角色Id获取机构Id集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysRoleOwnOrgListGet: async (id: number, status?: StatusEnum, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
apiSysRoleOwnOrgListGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysRoleOwnOrgListGet.');
|
||||
@ -602,10 +595,6 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
if (status !== undefined) {
|
||||
localVarQueryParameter['Status'] = status;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
@ -678,11 +667,10 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
*
|
||||
* @summary 获取角色接口黑名单集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysRoleRoleApiListGet: async (id: number, status?: StatusEnum, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
apiSysRoleRoleApiListGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysRoleRoleApiListGet.');
|
||||
@ -707,10 +695,6 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
if (status !== undefined) {
|
||||
localVarQueryParameter['Status'] = status;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
@ -1113,12 +1097,11 @@ export const SysRoleApiFp = function(configuration?: Configuration) {
|
||||
*
|
||||
* @summary 根据角色Id获取菜单Id集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleOwnMenuListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListInt64>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleOwnMenuListGet(id, status, options);
|
||||
async apiSysRoleOwnMenuListGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListInt64>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleOwnMenuListGet(id, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1128,12 +1111,11 @@ export const SysRoleApiFp = function(configuration?: Configuration) {
|
||||
*
|
||||
* @summary 根据角色Id获取机构Id集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleOwnOrgListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListInt64>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleOwnOrgListGet(id, status, options);
|
||||
async apiSysRoleOwnOrgListGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListInt64>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleOwnOrgListGet(id, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1157,12 +1139,11 @@ export const SysRoleApiFp = function(configuration?: Configuration) {
|
||||
*
|
||||
* @summary 获取角色接口黑名单集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleRoleApiListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListString>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleRoleApiListGet(id, status, options);
|
||||
async apiSysRoleRoleApiListGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListString>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleRoleApiListGet(id, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1347,23 +1328,21 @@ export const SysRoleApiFactory = function (configuration?: Configuration, basePa
|
||||
*
|
||||
* @summary 根据角色Id获取菜单Id集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleOwnMenuListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListInt64>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleOwnMenuListGet(id, status, options).then((request) => request(axios, basePath));
|
||||
async apiSysRoleOwnMenuListGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListInt64>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleOwnMenuListGet(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取机构Id集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleOwnOrgListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListInt64>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleOwnOrgListGet(id, status, options).then((request) => request(axios, basePath));
|
||||
async apiSysRoleOwnOrgListGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListInt64>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleOwnOrgListGet(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1379,12 +1358,11 @@ export const SysRoleApiFactory = function (configuration?: Configuration, basePa
|
||||
*
|
||||
* @summary 获取角色接口黑名单集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleRoleApiListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListString>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleRoleApiListGet(id, status, options).then((request) => request(axios, basePath));
|
||||
async apiSysRoleRoleApiListGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListString>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleRoleApiListGet(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1556,25 +1534,23 @@ export class SysRoleApi extends BaseAPI {
|
||||
*
|
||||
* @summary 根据角色Id获取菜单Id集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRoleApi
|
||||
*/
|
||||
public async apiSysRoleOwnMenuListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListInt64>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleOwnMenuListGet(id, status, options).then((request) => request(this.axios, this.basePath));
|
||||
public async apiSysRoleOwnMenuListGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListInt64>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleOwnMenuListGet(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取机构Id集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRoleApi
|
||||
*/
|
||||
public async apiSysRoleOwnOrgListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListInt64>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleOwnOrgListGet(id, status, options).then((request) => request(this.axios, this.basePath));
|
||||
public async apiSysRoleOwnOrgListGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListInt64>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleOwnOrgListGet(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -1591,13 +1567,12 @@ export class SysRoleApi extends BaseAPI {
|
||||
*
|
||||
* @summary 获取角色接口黑名单集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRoleApi
|
||||
*/
|
||||
public async apiSysRoleRoleApiListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListString>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleRoleApiListGet(id, status, options).then((request) => request(this.axios, this.basePath));
|
||||
public async apiSysRoleRoleApiListGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListString>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleRoleApiListGet(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
||||
@ -12,10 +12,13 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Filter } from './filter';
|
||||
import { Search } from './search';
|
||||
import { AddSysCodeGenTable } from './add-sys-code-gen-table';
|
||||
import { CodeGenMethodEnum } from './code-gen-method-enum';
|
||||
import { CodeGenPrintTypeEnum } from './code-gen-print-type-enum';
|
||||
import { CodeGenSceneEnum } from './code-gen-scene-enum';
|
||||
import { EffectTreeConfigInput } from './effect-tree-config-input';
|
||||
/**
|
||||
*
|
||||
* 代码生成参数类
|
||||
*
|
||||
* @export
|
||||
* @interface AddCodeGenInput
|
||||
@ -23,152 +26,114 @@ import { Search } from './search';
|
||||
export interface AddCodeGenInput {
|
||||
|
||||
/**
|
||||
* @type {Search}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
search?: Search;
|
||||
|
||||
/**
|
||||
* 模糊查询关键字
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
keyword?: string | null;
|
||||
|
||||
/**
|
||||
* @type {Filter}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
filter?: Filter;
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
page?: number;
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 页码容量
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
pageSize?: number;
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
field?: string | null;
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 排序方向
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
order?: string | null;
|
||||
|
||||
/**
|
||||
* 降序排序
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
descStr?: string | null;
|
||||
|
||||
/**
|
||||
* 类名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
className?: string | null;
|
||||
|
||||
/**
|
||||
* 是否移除表前缀
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
tablePrefix?: string | null;
|
||||
|
||||
/**
|
||||
* 库定位器名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
configId?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库名(保留字段)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
dbName?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
dbType?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库链接
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
connectionString?: string | null;
|
||||
|
||||
/**
|
||||
* 树控件名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
treeName?: string | null;
|
||||
|
||||
/**
|
||||
* 树控件key
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
treeKey?: string | null;
|
||||
|
||||
/**
|
||||
* 功能名(数据库表名称)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
tableComment?: string | null;
|
||||
|
||||
/**
|
||||
* 菜单应用分类(应用编码)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
menuApplication?: string | null;
|
||||
|
||||
/**
|
||||
* 菜单父级
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
menuPid?: number | null;
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 作者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
authorName?: string | null;
|
||||
|
||||
/**
|
||||
* 作者邮箱
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
email?: string | null;
|
||||
|
||||
/**
|
||||
* @type {EffectTreeConfigInput}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
treeConfig?: EffectTreeConfigInput;
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
moduleName?: string | null;
|
||||
|
||||
/**
|
||||
* 是否水平布局
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
isHorizontal?: boolean;
|
||||
|
||||
/**
|
||||
* 是否生成菜单
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
generateMenu?: boolean;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
@ -179,20 +144,12 @@ export interface AddCodeGenInput {
|
||||
menuIcon?: string | null;
|
||||
|
||||
/**
|
||||
* 页面目录
|
||||
* 菜单编码
|
||||
*
|
||||
* @type {string}
|
||||
* @type {number}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
pagePath?: string | null;
|
||||
|
||||
/**
|
||||
* 支持打印类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
printType?: string | null;
|
||||
menuPid?: number;
|
||||
|
||||
/**
|
||||
* 打印模版名称
|
||||
@ -203,20 +160,40 @@ export interface AddCodeGenInput {
|
||||
printName?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库表名
|
||||
* 是否使用 Api Service
|
||||
*
|
||||
* @type {string}
|
||||
* @type {boolean}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
tableName: string;
|
||||
isApiService?: boolean;
|
||||
|
||||
/**
|
||||
* 业务名(业务代码包名称)
|
||||
* 关联表
|
||||
*
|
||||
* @type {Array<AddSysCodeGenTable>}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
tableList: Array<AddSysCodeGenTable>;
|
||||
|
||||
/**
|
||||
* 简拼
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
busName: string;
|
||||
pinyin?: string | null;
|
||||
|
||||
/**
|
||||
* @type {CodeGenMethodEnum}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
generateMethod?: CodeGenMethodEnum;
|
||||
|
||||
/**
|
||||
* @type {CodeGenSceneEnum}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
scene?: CodeGenSceneEnum;
|
||||
|
||||
/**
|
||||
* 命名空间
|
||||
@ -227,114 +204,24 @@ export interface AddCodeGenInput {
|
||||
nameSpace: string;
|
||||
|
||||
/**
|
||||
* 作者姓名
|
||||
* 业务名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
authorName: string;
|
||||
busName: string;
|
||||
|
||||
/**
|
||||
* 生成方式
|
||||
* 页面目录
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
generateType: string;
|
||||
pagePath: string;
|
||||
|
||||
/**
|
||||
* 是否生成菜单
|
||||
*
|
||||
* @type {boolean}
|
||||
* @type {CodeGenPrintTypeEnum}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
generateMenu: boolean;
|
||||
|
||||
/**
|
||||
* 是否使用 Api Service
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
isApiService?: boolean;
|
||||
|
||||
/**
|
||||
* 模板Id集合
|
||||
*
|
||||
* @type {Array<number>}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
codeGenTemplateIds?: Array<number> | null;
|
||||
|
||||
/**
|
||||
* 左边树形结构表
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
leftTab?: string | null;
|
||||
|
||||
/**
|
||||
* 左边关联字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
leftKey?: string | null;
|
||||
|
||||
/**
|
||||
* 左边关联主表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
leftPrimaryKey?: string | null;
|
||||
|
||||
/**
|
||||
* 左边树Name
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
leftName?: string | null;
|
||||
|
||||
/**
|
||||
* 下表名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
bottomTab?: string | null;
|
||||
|
||||
/**
|
||||
* 下表关联字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
bottomKey?: string | null;
|
||||
|
||||
/**
|
||||
* 下表关联主表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
bottomPrimaryKey?: string | null;
|
||||
|
||||
/**
|
||||
* 模板
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
template?: string | null;
|
||||
|
||||
/**
|
||||
* 表类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddCodeGenInput
|
||||
*/
|
||||
tabType?: string | null;
|
||||
printType?: CodeGenPrintTypeEnum;
|
||||
}
|
||||
|
||||
@ -1,149 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { YesNoEnum } from './yes-no-enum';
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @export
|
||||
* @interface AddConfigTenantInput
|
||||
*/
|
||||
export interface AddConfigTenantInput {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
code?: string | null;
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
value?: string | null;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
sysFlag?: YesNoEnum;
|
||||
|
||||
/**
|
||||
* 分组编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
groupCode?: string | null;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
orderNo?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
remark?: string | null;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddConfigTenantInput
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
}
|
||||
@ -125,12 +125,6 @@ export interface AddDictTypeInput {
|
||||
*/
|
||||
status?: StatusEnum;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof AddDictTypeInput
|
||||
*/
|
||||
isTenant?: YesNoEnum;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof AddDictTypeInput
|
||||
|
||||
268
Web/src/api-services/system/models/add-sys-code-gen-column.ts
Normal file
268
Web/src/api-services/system/models/add-sys-code-gen-column.ts
Normal file
@ -0,0 +1,268 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { CodeGenEffectTypeEnum } from './code-gen-effect-type-enum';
|
||||
import { CodeGenFromRuleValidEnum } from './code-gen-from-rule-valid-enum';
|
||||
/**
|
||||
* 增加表字段输入参数
|
||||
*
|
||||
* @export
|
||||
* @interface AddSysCodeGenColumn
|
||||
*/
|
||||
export interface AddSysCodeGenColumn {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 字段数据长度
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
columnLength?: number | null;
|
||||
|
||||
/**
|
||||
* 控件配置
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
config?: string | null;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isPrimarykey?: boolean;
|
||||
|
||||
/**
|
||||
* 是否通用字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isCommon?: boolean;
|
||||
|
||||
/**
|
||||
* 是否必填
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isRequired?: boolean;
|
||||
|
||||
/**
|
||||
* 增改
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isAddUpdate?: boolean;
|
||||
|
||||
/**
|
||||
* 导入导出
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isImport?: boolean;
|
||||
|
||||
/**
|
||||
* 是否可排序
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isSortable?: boolean;
|
||||
|
||||
/**
|
||||
* 是否是统计字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isStatistical?: boolean;
|
||||
|
||||
/**
|
||||
* 是否是查询条件
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isQuery?: boolean;
|
||||
|
||||
/**
|
||||
* 查询方式
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
queryType?: string | null;
|
||||
|
||||
/**
|
||||
* 列表显示
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isTable?: boolean;
|
||||
|
||||
/**
|
||||
* 内容复制
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
isCopy?: boolean;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
defaultValue?: string | null;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
orderNo?: number;
|
||||
|
||||
/**
|
||||
* 代码生成表Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
codeGenTableId: number;
|
||||
|
||||
/**
|
||||
* 数据库字段名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
columnName: string;
|
||||
|
||||
/**
|
||||
* 实体属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
propertyName: string;
|
||||
|
||||
/**
|
||||
* .NET数据类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
netType: string;
|
||||
|
||||
/**
|
||||
* 数据库中类型(物理类型)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
dataType: string;
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
columnComment: string;
|
||||
|
||||
/**
|
||||
* @type {CodeGenEffectTypeEnum}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
effectType?: CodeGenEffectTypeEnum;
|
||||
|
||||
/**
|
||||
* @type {CodeGenFromRuleValidEnum}
|
||||
* @memberof AddSysCodeGenColumn
|
||||
*/
|
||||
fromValid?: CodeGenFromRuleValidEnum;
|
||||
}
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { YesNoEnum } from './yes-no-enum';
|
||||
import { AddSysCodeGenColumn } from './add-sys-code-gen-column';
|
||||
/**
|
||||
*
|
||||
* 添加关联表
|
||||
*
|
||||
* @export
|
||||
* @interface UpdateConfigTenantInput
|
||||
* @interface AddSysCodeGenTable
|
||||
*/
|
||||
export interface UpdateConfigTenantInput {
|
||||
export interface AddSysCodeGenTable {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface UpdateConfigTenantInput {
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
@ -41,7 +41,7 @@ export interface UpdateConfigTenantInput {
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
@ -49,7 +49,7 @@ export interface UpdateConfigTenantInput {
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
@ -57,7 +57,7 @@ export interface UpdateConfigTenantInput {
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
@ -65,7 +65,7 @@ export interface UpdateConfigTenantInput {
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
@ -73,7 +73,7 @@ export interface UpdateConfigTenantInput {
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
@ -81,69 +81,79 @@ export interface UpdateConfigTenantInput {
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
* 上级联表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
name: string;
|
||||
lastLinkPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
* 下级联表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
code?: string | null;
|
||||
nextLinkPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
* 字段列表
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @type {Array<AddSysCodeGenColumn>}
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
value?: string | null;
|
||||
columnList: Array<AddSysCodeGenColumn>;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
*/
|
||||
sysFlag?: YesNoEnum;
|
||||
|
||||
/**
|
||||
* 分组编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
*/
|
||||
groupCode?: string | null;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
* 代码生成Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
orderNo?: number;
|
||||
codeGenId: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
* 数据库配置id
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
remark?: string | null;
|
||||
configId: string;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
* 数据库表名
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateConfigTenantInput
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
tableName: string;
|
||||
|
||||
/**
|
||||
* 表实体名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
entityName: string;
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
moduleName: string;
|
||||
|
||||
/**
|
||||
* 业务名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AddSysCodeGenTable
|
||||
*/
|
||||
busName: string;
|
||||
}
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SysCodeGenTemplate } from './sys-code-gen-template';
|
||||
import { CodeGenColumnConfig } from './code-gen-column-config';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultListSysCodeGenTemplate
|
||||
* @interface AdminNETResultListCodeGenColumnConfig
|
||||
*/
|
||||
export interface AdminNETResultListSysCodeGenTemplate {
|
||||
export interface AdminNETResultListCodeGenColumnConfig {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultListSysCodeGenTemplate
|
||||
* @memberof AdminNETResultListCodeGenColumnConfig
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface AdminNETResultListSysCodeGenTemplate {
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListSysCodeGenTemplate
|
||||
* @memberof AdminNETResultListCodeGenColumnConfig
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
@ -41,23 +41,23 @@ export interface AdminNETResultListSysCodeGenTemplate {
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListSysCodeGenTemplate
|
||||
* @memberof AdminNETResultListCodeGenColumnConfig
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*
|
||||
* @type {Array<SysCodeGenTemplate>}
|
||||
* @memberof AdminNETResultListSysCodeGenTemplate
|
||||
* @type {Array<CodeGenColumnConfig>}
|
||||
* @memberof AdminNETResultListCodeGenColumnConfig
|
||||
*/
|
||||
result?: Array<SysCodeGenTemplate> | null;
|
||||
result?: Array<CodeGenColumnConfig> | null;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultListSysCodeGenTemplate
|
||||
* @memberof AdminNETResultListCodeGenColumnConfig
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
@ -65,7 +65,7 @@ export interface AdminNETResultListSysCodeGenTemplate {
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultListSysCodeGenTemplate
|
||||
* @memberof AdminNETResultListCodeGenColumnConfig
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { CodeGenConfig } from './code-gen-config';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultListCodeGenConfig
|
||||
*/
|
||||
export interface AdminNETResultListCodeGenConfig {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultListCodeGenConfig
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
/**
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListCodeGenConfig
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListCodeGenConfig
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*
|
||||
* @type {Array<CodeGenConfig>}
|
||||
* @memberof AdminNETResultListCodeGenConfig
|
||||
*/
|
||||
result?: Array<CodeGenConfig> | null;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultListCodeGenConfig
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultListCodeGenConfig
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { ColumnOuput } from './column-ouput';
|
||||
import { ColumnOutput } from './column-output';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultListColumnOuput
|
||||
* @interface AdminNETResultListColumnOutput
|
||||
*/
|
||||
export interface AdminNETResultListColumnOuput {
|
||||
export interface AdminNETResultListColumnOutput {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultListColumnOuput
|
||||
* @memberof AdminNETResultListColumnOutput
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface AdminNETResultListColumnOuput {
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListColumnOuput
|
||||
* @memberof AdminNETResultListColumnOutput
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
@ -41,23 +41,23 @@ export interface AdminNETResultListColumnOuput {
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListColumnOuput
|
||||
* @memberof AdminNETResultListColumnOutput
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*
|
||||
* @type {Array<ColumnOuput>}
|
||||
* @memberof AdminNETResultListColumnOuput
|
||||
* @type {Array<ColumnOutput>}
|
||||
* @memberof AdminNETResultListColumnOutput
|
||||
*/
|
||||
result?: Array<ColumnOuput> | null;
|
||||
result?: Array<ColumnOutput> | null;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultListColumnOuput
|
||||
* @memberof AdminNETResultListColumnOutput
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
@ -65,7 +65,7 @@ export interface AdminNETResultListColumnOuput {
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultListColumnOuput
|
||||
* @memberof AdminNETResultListColumnOutput
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SysConfigTenant } from './sys-config-tenant';
|
||||
import { SysCodeGenColumn } from './sys-code-gen-column';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultListSysConfigTenant
|
||||
* @interface AdminNETResultListSysCodeGenColumn
|
||||
*/
|
||||
export interface AdminNETResultListSysConfigTenant {
|
||||
export interface AdminNETResultListSysCodeGenColumn {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultListSysConfigTenant
|
||||
* @memberof AdminNETResultListSysCodeGenColumn
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface AdminNETResultListSysConfigTenant {
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListSysConfigTenant
|
||||
* @memberof AdminNETResultListSysCodeGenColumn
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
@ -41,23 +41,23 @@ export interface AdminNETResultListSysConfigTenant {
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultListSysConfigTenant
|
||||
* @memberof AdminNETResultListSysCodeGenColumn
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* 数据
|
||||
*
|
||||
* @type {Array<SysConfigTenant>}
|
||||
* @memberof AdminNETResultListSysConfigTenant
|
||||
* @type {Array<SysCodeGenColumn>}
|
||||
* @memberof AdminNETResultListSysCodeGenColumn
|
||||
*/
|
||||
result?: Array<SysConfigTenant> | null;
|
||||
result?: Array<SysCodeGenColumn> | null;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultListSysConfigTenant
|
||||
* @memberof AdminNETResultListSysCodeGenColumn
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
@ -65,7 +65,7 @@ export interface AdminNETResultListSysConfigTenant {
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultListSysConfigTenant
|
||||
* @memberof AdminNETResultListSysCodeGenColumn
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SqlSugarPagedListSysConfigTenant } from './sql-sugar-paged-list-sys-config-tenant';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultSqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
export interface AdminNETResultSqlSugarPagedListSysConfigTenant {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
/**
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* @type {SqlSugarPagedListSysConfigTenant}
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
result?: SqlSugarPagedListSysConfigTenant;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultSqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SysCodeGenConfig } from './sys-code-gen-config';
|
||||
import { SysCodeGenColumn } from './sys-code-gen-column';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultSysCodeGenConfig
|
||||
* @interface AdminNETResultSysCodeGenColumn
|
||||
*/
|
||||
export interface AdminNETResultSysCodeGenConfig {
|
||||
export interface AdminNETResultSysCodeGenColumn {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultSysCodeGenConfig
|
||||
* @memberof AdminNETResultSysCodeGenColumn
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface AdminNETResultSysCodeGenConfig {
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSysCodeGenConfig
|
||||
* @memberof AdminNETResultSysCodeGenColumn
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
@ -41,21 +41,21 @@ export interface AdminNETResultSysCodeGenConfig {
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSysCodeGenConfig
|
||||
* @memberof AdminNETResultSysCodeGenColumn
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* @type {SysCodeGenConfig}
|
||||
* @memberof AdminNETResultSysCodeGenConfig
|
||||
* @type {SysCodeGenColumn}
|
||||
* @memberof AdminNETResultSysCodeGenColumn
|
||||
*/
|
||||
result?: SysCodeGenConfig;
|
||||
result?: SysCodeGenColumn;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultSysCodeGenConfig
|
||||
* @memberof AdminNETResultSysCodeGenColumn
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
@ -63,7 +63,7 @@ export interface AdminNETResultSysCodeGenConfig {
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultSysCodeGenConfig
|
||||
* @memberof AdminNETResultSysCodeGenColumn
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SysConfigTenant } from './sys-config-tenant';
|
||||
import { SysCodeGenTable } from './sys-code-gen-table';
|
||||
/**
|
||||
* 全局返回结果
|
||||
*
|
||||
* @export
|
||||
* @interface AdminNETResultSysConfigTenant
|
||||
* @interface AdminNETResultSysCodeGenTable
|
||||
*/
|
||||
export interface AdminNETResultSysConfigTenant {
|
||||
export interface AdminNETResultSysCodeGenTable {
|
||||
|
||||
/**
|
||||
* 状态码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof AdminNETResultSysConfigTenant
|
||||
* @memberof AdminNETResultSysCodeGenTable
|
||||
*/
|
||||
code?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface AdminNETResultSysConfigTenant {
|
||||
* 类型success、warning、error
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSysConfigTenant
|
||||
* @memberof AdminNETResultSysCodeGenTable
|
||||
*/
|
||||
type?: string | null;
|
||||
|
||||
@ -41,21 +41,21 @@ export interface AdminNETResultSysConfigTenant {
|
||||
* 错误信息
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof AdminNETResultSysConfigTenant
|
||||
* @memberof AdminNETResultSysCodeGenTable
|
||||
*/
|
||||
message?: string | null;
|
||||
|
||||
/**
|
||||
* @type {SysConfigTenant}
|
||||
* @memberof AdminNETResultSysConfigTenant
|
||||
* @type {SysCodeGenTable}
|
||||
* @memberof AdminNETResultSysCodeGenTable
|
||||
*/
|
||||
result?: SysConfigTenant;
|
||||
result?: SysCodeGenTable;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof AdminNETResultSysConfigTenant
|
||||
* @memberof AdminNETResultSysCodeGenTable
|
||||
*/
|
||||
extras?: any | null;
|
||||
|
||||
@ -63,7 +63,7 @@ export interface AdminNETResultSysConfigTenant {
|
||||
* 时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof AdminNETResultSysConfigTenant
|
||||
* @memberof AdminNETResultSysCodeGenTable
|
||||
*/
|
||||
time?: Date;
|
||||
}
|
||||
@ -22,7 +22,15 @@ import { ApiOutput } from './api-output';
|
||||
export interface ApiOutput {
|
||||
|
||||
/**
|
||||
* 名称(组名、路由名)
|
||||
* 组名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiOutput
|
||||
*/
|
||||
groupName?: string | null;
|
||||
|
||||
/**
|
||||
* 控制器名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ApiOutput
|
||||
@ -35,7 +43,15 @@ export interface ApiOutput {
|
||||
* @type {string}
|
||||
* @memberof ApiOutput
|
||||
*/
|
||||
text?: string | null;
|
||||
desc?: string | null;
|
||||
|
||||
/**
|
||||
* 是否是移动端接口
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ApiOutput
|
||||
*/
|
||||
isAppApi?: boolean;
|
||||
|
||||
/**
|
||||
* 路由
|
||||
|
||||
480
Web/src/api-services/system/models/code-gen-column-config.ts
Normal file
480
Web/src/api-services/system/models/code-gen-column-config.ts
Normal file
@ -0,0 +1,480 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { CodeGenEffectTypeEnum } from './code-gen-effect-type-enum';
|
||||
import { CodeGenFromRuleValidEnum } from './code-gen-from-rule-valid-enum';
|
||||
import { EffectDatePickerConfigInput } from './effect-date-picker-config-input';
|
||||
import { EffectDictConfigInput } from './effect-dict-config-input';
|
||||
import { EffectFileConfigInput } from './effect-file-config-input';
|
||||
import { EffectTreeConfigInput } from './effect-tree-config-input';
|
||||
/**
|
||||
* 代码生成详细配置参数
|
||||
*
|
||||
* @export
|
||||
* @interface CodeGenColumnConfig
|
||||
*/
|
||||
export interface CodeGenColumnConfig {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 代码生成表Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
codeGenTableId?: number;
|
||||
|
||||
/**
|
||||
* 数据库字段名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
columnName: string;
|
||||
|
||||
/**
|
||||
* 实体属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
propertyName: string;
|
||||
|
||||
/**
|
||||
* .NET数据类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
netType?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库中类型(物理类型)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
dataType?: string | null;
|
||||
|
||||
/**
|
||||
* 字段数据长度
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
columnLength?: number | null;
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
columnComment?: string | null;
|
||||
|
||||
/**
|
||||
* @type {CodeGenEffectTypeEnum}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
effectType?: CodeGenEffectTypeEnum;
|
||||
|
||||
/**
|
||||
* 控件配置
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
config?: string | null;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isPrimarykey?: boolean;
|
||||
|
||||
/**
|
||||
* 是否通用字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isCommon?: boolean;
|
||||
|
||||
/**
|
||||
* 是否必填
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isRequired?: boolean;
|
||||
|
||||
/**
|
||||
* 增改
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isAddUpdate?: boolean;
|
||||
|
||||
/**
|
||||
* 导入导出
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isImport?: boolean;
|
||||
|
||||
/**
|
||||
* 是否可排序
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isSortable?: boolean;
|
||||
|
||||
/**
|
||||
* 是否是统计字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isStatistical?: boolean;
|
||||
|
||||
/**
|
||||
* 是否是查询条件
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isQuery?: boolean;
|
||||
|
||||
/**
|
||||
* 查询方式
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
queryType?: string | null;
|
||||
|
||||
/**
|
||||
* 列表显示
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isTable?: boolean;
|
||||
|
||||
/**
|
||||
* 内容复制
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isCopy?: boolean;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
defaultValue?: string | null;
|
||||
|
||||
/**
|
||||
* @type {CodeGenFromRuleValidEnum}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
fromValid?: CodeGenFromRuleValidEnum;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
orderNo?: number;
|
||||
|
||||
/**
|
||||
* 首字母小写的属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
lowerPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 是否字典字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isDict?: boolean;
|
||||
|
||||
/**
|
||||
* 是否枚举字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isEnum?: boolean;
|
||||
|
||||
/**
|
||||
* 是否常量字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isConst?: boolean;
|
||||
|
||||
/**
|
||||
* 是否上传字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isUpload?: boolean;
|
||||
|
||||
/**
|
||||
* 是否开关字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isSwitch?: boolean;
|
||||
|
||||
/**
|
||||
* 是否输入框字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isInput?: boolean;
|
||||
|
||||
/**
|
||||
* 是否数字输入框字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isInputNumber?: boolean;
|
||||
|
||||
/**
|
||||
* 是否文本域字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isInputTextArea?: boolean;
|
||||
|
||||
/**
|
||||
* 是否时间选择器字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isDatePicker?: boolean;
|
||||
|
||||
/**
|
||||
* 是否外键字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isForeignKey?: boolean;
|
||||
|
||||
/**
|
||||
* 是否树字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isTree?: boolean;
|
||||
|
||||
/**
|
||||
* 是否多选字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
multiple?: boolean;
|
||||
|
||||
/**
|
||||
* 是否唯一字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isUnique?: boolean;
|
||||
|
||||
/**
|
||||
* 状态字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
isStatus?: boolean;
|
||||
|
||||
/**
|
||||
* 是否要联表
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
hasJoinTable?: boolean;
|
||||
|
||||
/**
|
||||
* 是否要插槽
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
hasSlots?: boolean;
|
||||
|
||||
/**
|
||||
* 连表别名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
leftJoinAliasName?: string | null;
|
||||
|
||||
/**
|
||||
* @type {EffectFileConfigInput}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
fileConfig?: EffectFileConfigInput;
|
||||
|
||||
/**
|
||||
* @type {EffectDictConfigInput}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
dictConfig?: EffectDictConfigInput;
|
||||
|
||||
/**
|
||||
* @type {EffectTreeConfigInput}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
joinConfig?: EffectTreeConfigInput;
|
||||
|
||||
/**
|
||||
* @type {EffectDatePickerConfigInput}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
dateConfig?: EffectDatePickerConfigInput;
|
||||
|
||||
/**
|
||||
* 获取可空类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
nullableNetType?: string | null;
|
||||
|
||||
/**
|
||||
* 显示字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
displayPropertyNames?: string | null;
|
||||
|
||||
/**
|
||||
* 连表属性名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
leftJoinPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 获取列格式化配置方法
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
getVxeColumnExtraConfig?: string | null;
|
||||
|
||||
/**
|
||||
* 获取表单验证规则
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenColumnConfig
|
||||
*/
|
||||
getFormRules?: string | null;
|
||||
}
|
||||
@ -1,351 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { VerifyRuleItem } from './verify-rule-item';
|
||||
/**
|
||||
* 代码生成详细配置参数
|
||||
*
|
||||
* @export
|
||||
* @interface CodeGenConfig
|
||||
*/
|
||||
export interface CodeGenConfig {
|
||||
|
||||
/**
|
||||
* 主键Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 代码生成主表ID
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
codeGenId?: number;
|
||||
|
||||
/**
|
||||
* 数据库字段名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
columnName?: string | null;
|
||||
|
||||
/**
|
||||
* 实体属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
propertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 字段数据长度
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
columnLength?: number;
|
||||
|
||||
/**
|
||||
* 数据库字段名(首字母小写)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
lowerPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
columnComment?: string | null;
|
||||
|
||||
/**
|
||||
* .NET类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
netType?: string | null;
|
||||
|
||||
/**
|
||||
* 作用类型(字典)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
effectType?: string | null;
|
||||
|
||||
/**
|
||||
* 外键库标识
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
fkConfigId?: string | null;
|
||||
|
||||
/**
|
||||
* 外键实体名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
fkEntityName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键表名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
fkTableName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键实体名称(首字母小写)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
lowerFkEntityName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键显示字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
fkColumnName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键链接字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
fkLinkColumnName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键显示字段(首字母小写)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
lowerFkColumnName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键显示字段.NET类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
fkColumnNetType?: string | null;
|
||||
|
||||
/**
|
||||
* 字典code
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
dictTypeCode?: string | null;
|
||||
|
||||
/**
|
||||
* 列表是否缩进(字典)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
whetherRetract?: string | null;
|
||||
|
||||
/**
|
||||
* 是否必填(字典)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
whetherRequired?: string | null;
|
||||
|
||||
/**
|
||||
* 是否可排序(字典)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
whetherSortable?: string | null;
|
||||
|
||||
/**
|
||||
* 是否是统计字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
statistical?: string | null;
|
||||
|
||||
/**
|
||||
* 是否是GroupBy字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
isGroupBy?: string | null;
|
||||
|
||||
/**
|
||||
* 是否是查询条件
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
queryWhether?: string | null;
|
||||
|
||||
/**
|
||||
* 查询方式
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
queryType?: string | null;
|
||||
|
||||
/**
|
||||
* 列表显示
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
whetherTable?: string | null;
|
||||
|
||||
/**
|
||||
* 增改
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
whetherAddUpdate?: string | null;
|
||||
|
||||
/**
|
||||
* 主外键
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
columnKey?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库中类型(物理类型)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
dataType?: string | null;
|
||||
|
||||
/**
|
||||
* 是否是通用字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
whetherCommon?: string | null;
|
||||
|
||||
/**
|
||||
* 表的别名 Table as XXX
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
tableNickName?: string | null;
|
||||
|
||||
/**
|
||||
* 显示文本字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
displayColumn?: string | null;
|
||||
|
||||
/**
|
||||
* 选中值字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
valueColumn?: string | null;
|
||||
|
||||
/**
|
||||
* 父级字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
pidColumn?: string | null;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
orderNo?: number;
|
||||
|
||||
/**
|
||||
* 字段验证规则
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
rules?: string | null;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
defaultValue?: string | null;
|
||||
|
||||
/**
|
||||
* 字段验证集合
|
||||
*
|
||||
* @type {Array<VerifyRuleItem>}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
ruleItems?: Array<VerifyRuleItem> | null;
|
||||
|
||||
/**
|
||||
* 是否远程验证
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
remoteVerify?: boolean;
|
||||
|
||||
/**
|
||||
* 是否存在验证规则
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
anyRule?: boolean;
|
||||
|
||||
/**
|
||||
* 验证触发器
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CodeGenConfig
|
||||
*/
|
||||
trigger?: string | null;
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 代码生成控件类型枚举<br /> 输入框 Input = 100<br /> 字典选择器 DictSelector = 101<br /> 常量选择器 ConstSelector = 102<br /> 枚举选择器 EnumSelector = 103<br /> 树选择器 ApiTreeSelector = 104<br /> 外键 ForeignKey = 105<br /> 数字输入框 InputNumber = 106<br /> 时间选择 DatePicker = 107<br /> 文本域 InputTextArea = 108<br /> 上传 Upload = 109<br /> 开关 Switch = 110<br />
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum CodeGenEffectTypeEnum {
|
||||
NUMBER_100 = 100,
|
||||
NUMBER_101 = 101,
|
||||
NUMBER_102 = 102,
|
||||
NUMBER_103 = 103,
|
||||
NUMBER_104 = 104,
|
||||
NUMBER_105 = 105,
|
||||
NUMBER_106 = 106,
|
||||
NUMBER_107 = 107,
|
||||
NUMBER_108 = 108,
|
||||
NUMBER_109 = 109,
|
||||
NUMBER_110 = 110
|
||||
}
|
||||
|
||||
@ -0,0 +1,45 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 代码生成表单校验类型枚举<br /> 唯一性 Unique = 100<br /> 字符串长度 MaxLength = 101<br /> 数字范围 Range = 102<br /> 身份证号码 IDCard = 103<br /> 邮政编码 PostCode = 104<br /> 手机号码 PhoneNumber = 105<br /> 固话格式 Telephone = 106<br /> 手机或固话类型 PhoneOrTelNumber = 107<br /> 邮箱 EmailAddress = 108<br /> 统一社会信用代码 SocialCreditCode = 109<br /> 网址类型 Url = 110<br /> 中文 Chinese = 111<br /> 中文名 ChineseName = 112<br /> 英文名 EnglishName = 113<br /> 纯大写 Capital = 114<br /> 纯小写 Lowercase = 115<br /> 字母和数字组合 WordWithNumber = 116<br /> Html 标签格式 Html = 117<br /> GUID 或者 UUID GUID_OR_UUID = 118<br /> 用户名 Username = 119<br /> 日期类型 Date = 120<br /> 时间类型 Time = 121<br /> 年龄 Age = 122<br />
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum CodeGenFromRuleValidEnum {
|
||||
NUMBER_100 = 100,
|
||||
NUMBER_101 = 101,
|
||||
NUMBER_102 = 102,
|
||||
NUMBER_103 = 103,
|
||||
NUMBER_104 = 104,
|
||||
NUMBER_105 = 105,
|
||||
NUMBER_106 = 106,
|
||||
NUMBER_107 = 107,
|
||||
NUMBER_108 = 108,
|
||||
NUMBER_109 = 109,
|
||||
NUMBER_110 = 110,
|
||||
NUMBER_111 = 111,
|
||||
NUMBER_112 = 112,
|
||||
NUMBER_113 = 113,
|
||||
NUMBER_114 = 114,
|
||||
NUMBER_115 = 115,
|
||||
NUMBER_116 = 116,
|
||||
NUMBER_117 = 117,
|
||||
NUMBER_118 = 118,
|
||||
NUMBER_119 = 119,
|
||||
NUMBER_120 = 120,
|
||||
NUMBER_121 = 121,
|
||||
NUMBER_122 = 122
|
||||
}
|
||||
|
||||
@ -12,19 +12,17 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
/**
|
||||
* 代码生成方式枚举<br /> 下载压缩包 DownloadZip = 100<br /> 下载压缩包(前端) DownloadZipFrontend = 101<br /> 下载压缩包(后端) DownloadZipBackend = 102<br /> 生成到本项目 GenerateToProject = 200<br /> 生成到本项目(前端) GenerateToProjectFrontend = 201<br /> 生成到本项目(后端) GenerateToProjectBackend = 202<br />
|
||||
* @export
|
||||
* @interface DeleteConfigTenantInput
|
||||
* @enum {string}
|
||||
*/
|
||||
export interface DeleteConfigTenantInput {
|
||||
|
||||
/**
|
||||
* 主键Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DeleteConfigTenantInput
|
||||
*/
|
||||
id: number;
|
||||
export enum CodeGenMethodEnum {
|
||||
NUMBER_100 = 100,
|
||||
NUMBER_101 = 101,
|
||||
NUMBER_102 = 102,
|
||||
NUMBER_200 = 200,
|
||||
NUMBER_201 = 201,
|
||||
NUMBER_202 = 202
|
||||
}
|
||||
|
||||
@ -13,13 +13,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* 代码生成类型枚举<br /> 前端 Frontend = 1<br /> 后端 Backend = 2<br /> 种子数据 SeedData = 3<br />
|
||||
* 代码生成打印类型枚举<br /> 不需要 Off = 1<br /> 绑定打印模版 Custom = 2<br />
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum CodeGenTypeEnum {
|
||||
export enum CodeGenPrintTypeEnum {
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_2 = 2,
|
||||
NUMBER_3 = 3
|
||||
NUMBER_2 = 2
|
||||
}
|
||||
|
||||
30
Web/src/api-services/system/models/code-gen-scene-enum.ts
Normal file
30
Web/src/api-services/system/models/code-gen-scene-enum.ts
Normal file
@ -0,0 +1,30 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 代码生成模板枚举<br /> 单表 SingleTable = 1000<br /> 单表树组件 TreeSingleTable = 1010<br /> 主从表 MasterSlaveTables = 2000<br /> 主从表树组件 TreeMasterSlaveTables = 2010<br /> 关系对照 TableRelationship = 3000<br /> 关系对照树组件 TreeTableRelationship = 3010<br /> 表种子数据 TableSeedData = -2000<br /> 表实体 TableEntity = -1000<br />
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum CodeGenSceneEnum {
|
||||
NUMBER_1000 = 1000,
|
||||
NUMBER_1010 = 1010,
|
||||
NUMBER_2000 = 2000,
|
||||
NUMBER_2010 = 2010,
|
||||
NUMBER_3000 = 3000,
|
||||
NUMBER_3010 = 3010,
|
||||
NUMBER_MINUS_2000 = -2000,
|
||||
NUMBER_MINUS_1000 = -1000
|
||||
}
|
||||
|
||||
@ -16,31 +16,39 @@
|
||||
* 数据库表列
|
||||
*
|
||||
* @export
|
||||
* @interface ColumnOuput
|
||||
* @interface ColumnOutput
|
||||
*/
|
||||
export interface ColumnOuput {
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ColumnOuput
|
||||
*/
|
||||
columnName?: string | null;
|
||||
export interface ColumnOutput {
|
||||
|
||||
/**
|
||||
* 实体的Property名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ColumnOuput
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
propertyName?: string | null;
|
||||
|
||||
/**
|
||||
* .NET字段类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
netType?: string | null;
|
||||
|
||||
/**
|
||||
* 字段名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
columnName?: string | null;
|
||||
|
||||
/**
|
||||
* 字段数据长度
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ColumnOuput
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
columnLength?: number;
|
||||
|
||||
@ -48,7 +56,7 @@ export interface ColumnOuput {
|
||||
* 数据库中类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ColumnOuput
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
dataType?: string | null;
|
||||
|
||||
@ -56,47 +64,39 @@ export interface ColumnOuput {
|
||||
* 是否为主键
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ColumnOuput
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
isPrimarykey?: boolean;
|
||||
|
||||
/**
|
||||
* 是否为外键
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
isForeignKey?: boolean;
|
||||
|
||||
/**
|
||||
* 是否允许为空
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof ColumnOuput
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
isNullable?: boolean;
|
||||
|
||||
/**
|
||||
* .NET字段类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ColumnOuput
|
||||
*/
|
||||
netType?: string | null;
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ColumnOuput
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
columnComment?: string | null;
|
||||
|
||||
/**
|
||||
* 主外键
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ColumnOuput
|
||||
*/
|
||||
columnKey?: string | null;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ColumnOuput
|
||||
* @memberof ColumnOutput
|
||||
*/
|
||||
defaultValue?: string | null;
|
||||
}
|
||||
@ -13,18 +13,26 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* 获取默认列配置输入参数
|
||||
*
|
||||
* @export
|
||||
* @interface DeleteCodeGenInput
|
||||
* @interface DefaultColumnConfigInput
|
||||
*/
|
||||
export interface DeleteCodeGenInput {
|
||||
export interface DefaultColumnConfigInput {
|
||||
|
||||
/**
|
||||
* 代码生成器Id
|
||||
* 数据库配置id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof DeleteCodeGenInput
|
||||
* @type {string}
|
||||
* @memberof DefaultColumnConfigInput
|
||||
*/
|
||||
id: number;
|
||||
configId?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库表名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof DefaultColumnConfigInput
|
||||
*/
|
||||
tableName: string;
|
||||
}
|
||||
@ -13,26 +13,26 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* 批量配置参数输入
|
||||
* 时间控件配置信息类
|
||||
*
|
||||
* @export
|
||||
* @interface BatchConfigTenantInput
|
||||
* @interface EffectDatePickerConfigInput
|
||||
*/
|
||||
export interface BatchConfigTenantInput {
|
||||
export interface EffectDatePickerConfigInput {
|
||||
|
||||
/**
|
||||
* 编码
|
||||
* 格式
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof BatchConfigTenantInput
|
||||
* @memberof EffectDatePickerConfigInput
|
||||
*/
|
||||
code?: string | null;
|
||||
format: string;
|
||||
|
||||
/**
|
||||
* 属性值
|
||||
* 默认值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof BatchConfigTenantInput
|
||||
* @memberof EffectDatePickerConfigInput
|
||||
*/
|
||||
value?: string | null;
|
||||
_default?: string | null;
|
||||
}
|
||||
@ -13,26 +13,26 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* 表唯一配置项
|
||||
* 字典控件配置信息类
|
||||
*
|
||||
* @export
|
||||
* @interface TableUniqueConfigItem
|
||||
* @interface EffectDictConfigInput
|
||||
*/
|
||||
export interface TableUniqueConfigItem {
|
||||
export interface EffectDictConfigInput {
|
||||
|
||||
/**
|
||||
* 字段列表
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof TableUniqueConfigItem
|
||||
*/
|
||||
columns?: Array<string> | null;
|
||||
|
||||
/**
|
||||
* 描述信息
|
||||
* 字典编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TableUniqueConfigItem
|
||||
* @memberof EffectDictConfigInput
|
||||
*/
|
||||
message?: string | null;
|
||||
code: string;
|
||||
|
||||
/**
|
||||
* 是否多选
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof EffectDictConfigInput
|
||||
*/
|
||||
multiple?: boolean;
|
||||
}
|
||||
@ -13,34 +13,34 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* 代码生成模板关系表
|
||||
* 文件控件配置信息类
|
||||
*
|
||||
* @export
|
||||
* @interface SysCodeGenTemplateRelation
|
||||
* @interface EffectFileConfigInput
|
||||
*/
|
||||
export interface SysCodeGenTemplateRelation {
|
||||
export interface EffectFileConfigInput {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
* 链接预览
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenTemplateRelation
|
||||
* @type {boolean}
|
||||
* @memberof EffectFileConfigInput
|
||||
*/
|
||||
id?: number;
|
||||
useDownload?: boolean;
|
||||
|
||||
/**
|
||||
* 代码生成Id
|
||||
* 链接文本
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenTemplateRelation
|
||||
* @type {string}
|
||||
* @memberof EffectFileConfigInput
|
||||
*/
|
||||
codeGenId: number;
|
||||
downloadText?: string | null;
|
||||
|
||||
/**
|
||||
* 模板Id
|
||||
* 是否图片
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenTemplateRelation
|
||||
* @type {boolean}
|
||||
* @memberof EffectFileConfigInput
|
||||
*/
|
||||
templateId: number;
|
||||
isImage?: boolean;
|
||||
}
|
||||
134
Web/src/api-services/system/models/effect-tree-config-input.ts
Normal file
134
Web/src/api-services/system/models/effect-tree-config-input.ts
Normal file
@ -0,0 +1,134 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 树控件配置信息类
|
||||
*
|
||||
* @export
|
||||
* @interface EffectTreeConfigInput
|
||||
*/
|
||||
export interface EffectTreeConfigInput {
|
||||
|
||||
/**
|
||||
* 外键库标识
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
configId: string;
|
||||
|
||||
/**
|
||||
* 外键实体名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
entityName: string;
|
||||
|
||||
/**
|
||||
* 外键表名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
tableName: string;
|
||||
|
||||
/**
|
||||
* 表注释
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
tableComment: string;
|
||||
|
||||
/**
|
||||
* 外键显示属性名(多选)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
displayPropertyNames: string;
|
||||
|
||||
/**
|
||||
* 外键属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
linkPropertyName: string;
|
||||
|
||||
/**
|
||||
* 外键显示属性.NET类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
linkPropertyType: string;
|
||||
|
||||
/**
|
||||
* 用于检索的属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
searchPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 用于检索的属性.NET类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
searchPropertyType?: string | null;
|
||||
|
||||
/**
|
||||
* 是否使用表格
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
useTable?: boolean;
|
||||
|
||||
/**
|
||||
* 是否多选
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
multiple?: boolean;
|
||||
|
||||
/**
|
||||
* 树组件标题不能为空
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
treeTitle?: string | null;
|
||||
|
||||
/**
|
||||
* 父属性名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
parentPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 父属性.NET类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof EffectTreeConfigInput
|
||||
*/
|
||||
parentPropertyType?: string | null;
|
||||
}
|
||||
@ -1,7 +1,6 @@
|
||||
export * from './account-type-enum';
|
||||
export * from './add-code-gen-input';
|
||||
export * from './add-config-input';
|
||||
export * from './add-config-tenant-input';
|
||||
export * from './add-dict-data-input';
|
||||
export * from './add-dict-type-input';
|
||||
export * from './add-job-detail-input';
|
||||
@ -21,6 +20,8 @@ export * from './add-role-input';
|
||||
export * from './add-schedule-input';
|
||||
export * from './add-serial-input';
|
||||
export * from './add-subscribe-message-template-input';
|
||||
export * from './add-sys-code-gen-column';
|
||||
export * from './add-sys-code-gen-table';
|
||||
export * from './add-sys-ldap-input';
|
||||
export * from './add-tenant-input';
|
||||
export * from './add-user-input';
|
||||
@ -47,8 +48,8 @@ export * from './admin-netresult-int32';
|
||||
export * from './admin-netresult-int64';
|
||||
export * from './admin-netresult-jobject';
|
||||
export * from './admin-netresult-list-api-output';
|
||||
export * from './admin-netresult-list-code-gen-config';
|
||||
export * from './admin-netresult-list-column-ouput';
|
||||
export * from './admin-netresult-list-code-gen-column-config';
|
||||
export * from './admin-netresult-list-column-output';
|
||||
export * from './admin-netresult-list-const-output';
|
||||
export * from './admin-netresult-list-data-init-item-output';
|
||||
export * from './admin-netresult-list-database-output';
|
||||
@ -72,9 +73,8 @@ export * from './admin-netresult-list-role-table-output';
|
||||
export * from './admin-netresult-list-select-list-item';
|
||||
export * from './admin-netresult-list-stat-log-output';
|
||||
export * from './admin-netresult-list-string';
|
||||
export * from './admin-netresult-list-sys-code-gen-template';
|
||||
export * from './admin-netresult-list-sys-code-gen-column';
|
||||
export * from './admin-netresult-list-sys-config';
|
||||
export * from './admin-netresult-list-sys-config-tenant';
|
||||
export * from './admin-netresult-list-sys-dict-data';
|
||||
export * from './admin-netresult-list-sys-dict-type';
|
||||
export * from './admin-netresult-list-sys-file';
|
||||
@ -112,7 +112,6 @@ export * from './admin-netresult-sql-sugar-paged-list-page-serial-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-report-config-output';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-code-gen';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-config';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-config-tenant';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-dict-data';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-dict-type';
|
||||
export * from './admin-netresult-sql-sugar-paged-list-sys-file';
|
||||
@ -136,9 +135,9 @@ export * from './admin-netresult-sql-sugar-paged-list-user-output';
|
||||
export * from './admin-netresult-stress-test-harness-result';
|
||||
export * from './admin-netresult-string';
|
||||
export * from './admin-netresult-sys-code-gen';
|
||||
export * from './admin-netresult-sys-code-gen-config';
|
||||
export * from './admin-netresult-sys-code-gen-column';
|
||||
export * from './admin-netresult-sys-code-gen-table';
|
||||
export * from './admin-netresult-sys-config';
|
||||
export * from './admin-netresult-sys-config-tenant';
|
||||
export * from './admin-netresult-sys-dict-data';
|
||||
export * from './admin-netresult-sys-dict-type';
|
||||
export * from './admin-netresult-sys-file';
|
||||
@ -173,7 +172,6 @@ export * from './base-id-input';
|
||||
export * from './base-proc-input';
|
||||
export * from './base-status-input';
|
||||
export * from './batch-config-input';
|
||||
export * from './batch-config-tenant-input';
|
||||
export * from './board-info';
|
||||
export * from './calendar';
|
||||
export * from './calendar-algorithm-type';
|
||||
@ -187,10 +185,14 @@ export * from './chat-list-input';
|
||||
export * from './chat-list-output';
|
||||
export * from './chat-output';
|
||||
export * from './cluster-status';
|
||||
export * from './code-gen-config';
|
||||
export * from './code-gen-type-enum';
|
||||
export * from './code-gen-column-config';
|
||||
export * from './code-gen-effect-type-enum';
|
||||
export * from './code-gen-from-rule-valid-enum';
|
||||
export * from './code-gen-method-enum';
|
||||
export * from './code-gen-print-type-enum';
|
||||
export * from './code-gen-scene-enum';
|
||||
export * from './column-custom-output';
|
||||
export * from './column-ouput';
|
||||
export * from './column-output';
|
||||
export * from './column-relation';
|
||||
export * from './compare-info';
|
||||
export * from './const-output';
|
||||
@ -225,9 +227,8 @@ export * from './db-output';
|
||||
export * from './db-table-info';
|
||||
export * from './db-table-input';
|
||||
export * from './db-type';
|
||||
export * from './delete-code-gen-input';
|
||||
export * from './default-column-config-input';
|
||||
export * from './delete-config-input';
|
||||
export * from './delete-config-tenant-input';
|
||||
export * from './delete-db-column-input';
|
||||
export * from './delete-db-table-input';
|
||||
export * from './delete-dict-data-input';
|
||||
@ -253,6 +254,10 @@ export * from './dict-data-input';
|
||||
export * from './dict-type-input';
|
||||
export * from './digit-shapes';
|
||||
export * from './disk-info';
|
||||
export * from './effect-date-picker-config-input';
|
||||
export * from './effect-dict-config-input';
|
||||
export * from './effect-file-config-input';
|
||||
export * from './effect-tree-config-input';
|
||||
export * from './end-point';
|
||||
export * from './entity-column-info';
|
||||
export * from './entity-info';
|
||||
@ -361,7 +366,6 @@ export * from './open-access-output';
|
||||
export * from './order-by-type';
|
||||
export * from './page-code-gen-input';
|
||||
export * from './page-config-input';
|
||||
export * from './page-config-tenant-input';
|
||||
export * from './page-dict-data-input';
|
||||
export * from './page-dict-type-input';
|
||||
export * from './page-ex-log-input';
|
||||
@ -452,7 +456,6 @@ export * from './sql-sugar-paged-list-page-serial-output';
|
||||
export * from './sql-sugar-paged-list-report-config-output';
|
||||
export * from './sql-sugar-paged-list-sys-code-gen';
|
||||
export * from './sql-sugar-paged-list-sys-config';
|
||||
export * from './sql-sugar-paged-list-sys-config-tenant';
|
||||
export * from './sql-sugar-paged-list-sys-dict-data';
|
||||
export * from './sql-sugar-paged-list-sys-dict-type';
|
||||
export * from './sql-sugar-paged-list-sys-file';
|
||||
@ -483,11 +486,9 @@ export * from './sugar-index-attribute';
|
||||
export * from './swagger-submit-url-body';
|
||||
export * from './sync-sys-ldap-input';
|
||||
export * from './sys-code-gen';
|
||||
export * from './sys-code-gen-config';
|
||||
export * from './sys-code-gen-template';
|
||||
export * from './sys-code-gen-template-relation';
|
||||
export * from './sys-code-gen-column';
|
||||
export * from './sys-code-gen-table';
|
||||
export * from './sys-config';
|
||||
export * from './sys-config-tenant';
|
||||
export * from './sys-dict-data';
|
||||
export * from './sys-dict-type';
|
||||
export * from './sys-file';
|
||||
@ -535,7 +536,6 @@ export * from './system-hardware-info';
|
||||
export * from './system-runtime-info';
|
||||
export * from './table-column-output';
|
||||
export * from './table-output';
|
||||
export * from './table-unique-config-item';
|
||||
export * from './tenant-id-input';
|
||||
export * from './tenant-input';
|
||||
export * from './tenant-output';
|
||||
@ -544,13 +544,13 @@ export * from './tenant-user-input';
|
||||
export * from './text-info';
|
||||
export * from './tianditu-input';
|
||||
export * from './tree-node';
|
||||
export * from './tree-with-table-config-input';
|
||||
export * from './trigger-status';
|
||||
export * from './type';
|
||||
export * from './type-attributes';
|
||||
export * from './type-info';
|
||||
export * from './update-code-gen-input';
|
||||
export * from './update-config-input';
|
||||
export * from './update-config-tenant-input';
|
||||
export * from './update-db-column-input';
|
||||
export * from './update-db-table-input';
|
||||
export * from './update-dict-data-input';
|
||||
@ -580,7 +580,6 @@ export * from './upload-logo-tenant-id-body';
|
||||
export * from './user-menu-input';
|
||||
export * from './user-output';
|
||||
export * from './user-role-input';
|
||||
export * from './verify-rule-item';
|
||||
export * from './visual-column';
|
||||
export * from './visual-db-table';
|
||||
export * from './visual-table';
|
||||
|
||||
@ -83,103 +83,7 @@ export interface PageCodeGenInput {
|
||||
descStr?: string | null;
|
||||
|
||||
/**
|
||||
* 作者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
authorName?: string | null;
|
||||
|
||||
/**
|
||||
* 类名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
className?: string | null;
|
||||
|
||||
/**
|
||||
* 是否移除表前缀
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
tablePrefix?: string | null;
|
||||
|
||||
/**
|
||||
* 库定位器名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
configId?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库名(保留字段)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
dbName?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
dbType?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库链接
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
connectionString?: string | null;
|
||||
|
||||
/**
|
||||
* 生成方式
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
generateType?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库表名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
tableName?: string | null;
|
||||
|
||||
/**
|
||||
* 树控件名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
treeName?: string | null;
|
||||
|
||||
/**
|
||||
* 树控件key
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
treeKey?: string | null;
|
||||
|
||||
/**
|
||||
* 命名空间
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
nameSpace?: string | null;
|
||||
|
||||
/**
|
||||
* 业务名(业务代码包名称)
|
||||
* 业务名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
@ -187,74 +91,10 @@ export interface PageCodeGenInput {
|
||||
busName?: string | null;
|
||||
|
||||
/**
|
||||
* 功能名(数据库表名称)
|
||||
* 表名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
tableComment?: string | null;
|
||||
|
||||
/**
|
||||
* 菜单应用分类(应用编码)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
menuApplication?: string | null;
|
||||
|
||||
/**
|
||||
* 是否生成菜单
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
generateMenu?: boolean;
|
||||
|
||||
/**
|
||||
* 菜单父级
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
menuPid?: number | null;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
menuIcon?: string | null;
|
||||
|
||||
/**
|
||||
* 页面目录
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
pagePath?: string | null;
|
||||
|
||||
/**
|
||||
* 支持打印类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
printType?: string | null;
|
||||
|
||||
/**
|
||||
* 打印模版名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
printName?: string | null;
|
||||
|
||||
/**
|
||||
* 是否使用 Api Service
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PageCodeGenInput
|
||||
*/
|
||||
isApiService?: boolean;
|
||||
tableName?: string | null;
|
||||
}
|
||||
|
||||
@ -1,108 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Filter } from './filter';
|
||||
import { Search } from './search';
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @export
|
||||
* @interface PageConfigTenantInput
|
||||
*/
|
||||
export interface PageConfigTenantInput {
|
||||
|
||||
/**
|
||||
* @type {Search}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
search?: Search;
|
||||
|
||||
/**
|
||||
* 模糊查询关键字
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
keyword?: string | null;
|
||||
|
||||
/**
|
||||
* @type {Filter}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
filter?: Filter;
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
page?: number;
|
||||
|
||||
/**
|
||||
* 页码容量
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
pageSize?: number;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
field?: string | null;
|
||||
|
||||
/**
|
||||
* 排序方向
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
order?: string | null;
|
||||
|
||||
/**
|
||||
* 降序排序
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
descStr?: string | null;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
name?: string | null;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
code?: string | null;
|
||||
|
||||
/**
|
||||
* 分组编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PageConfigTenantInput
|
||||
*/
|
||||
groupCode?: string | null;
|
||||
}
|
||||
@ -1,87 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { SysConfigTenant } from './sys-config-tenant';
|
||||
/**
|
||||
* 分页泛型集合
|
||||
*
|
||||
* @export
|
||||
* @interface SqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
export interface SqlSugarPagedListSysConfigTenant {
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
page?: number;
|
||||
|
||||
/**
|
||||
* 页容量
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
pageSize?: number;
|
||||
|
||||
/**
|
||||
* 总条数
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
total?: number;
|
||||
|
||||
/**
|
||||
* 总页数
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
totalPages?: number;
|
||||
|
||||
/**
|
||||
* 当前页集合
|
||||
*
|
||||
* @type {Array<SysConfigTenant>}
|
||||
* @memberof SqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
items?: Array<SysConfigTenant> | null;
|
||||
|
||||
/**
|
||||
* 是否有上一页
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
hasPrevPage?: boolean;
|
||||
|
||||
/**
|
||||
* 是否有下一页
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
hasNextPage?: boolean;
|
||||
|
||||
/**
|
||||
* 统计数据
|
||||
*
|
||||
* @type {any}
|
||||
* @memberof SqlSugarPagedListSysConfigTenant
|
||||
*/
|
||||
totalInfo?: any | null;
|
||||
}
|
||||
268
Web/src/api-services/system/models/sys-code-gen-column.ts
Normal file
268
Web/src/api-services/system/models/sys-code-gen-column.ts
Normal file
@ -0,0 +1,268 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { CodeGenEffectTypeEnum } from './code-gen-effect-type-enum';
|
||||
import { CodeGenFromRuleValidEnum } from './code-gen-from-rule-valid-enum';
|
||||
/**
|
||||
* 代码生成表字段配置表
|
||||
*
|
||||
* @export
|
||||
* @interface SysCodeGenColumn
|
||||
*/
|
||||
export interface SysCodeGenColumn {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 代码生成表Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
codeGenTableId?: number;
|
||||
|
||||
/**
|
||||
* 数据库字段名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
columnName: string;
|
||||
|
||||
/**
|
||||
* 实体属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
propertyName: string;
|
||||
|
||||
/**
|
||||
* .NET数据类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
netType?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库中类型(物理类型)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
dataType?: string | null;
|
||||
|
||||
/**
|
||||
* 字段数据长度
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
columnLength?: number | null;
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
columnComment?: string | null;
|
||||
|
||||
/**
|
||||
* @type {CodeGenEffectTypeEnum}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
effectType?: CodeGenEffectTypeEnum;
|
||||
|
||||
/**
|
||||
* 控件配置
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
config?: string | null;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isPrimarykey?: boolean;
|
||||
|
||||
/**
|
||||
* 是否通用字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isCommon?: boolean;
|
||||
|
||||
/**
|
||||
* 是否必填
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isRequired?: boolean;
|
||||
|
||||
/**
|
||||
* 增改
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isAddUpdate?: boolean;
|
||||
|
||||
/**
|
||||
* 导入导出
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isImport?: boolean;
|
||||
|
||||
/**
|
||||
* 是否可排序
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isSortable?: boolean;
|
||||
|
||||
/**
|
||||
* 是否是统计字段
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isStatistical?: boolean;
|
||||
|
||||
/**
|
||||
* 是否是查询条件
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isQuery?: boolean;
|
||||
|
||||
/**
|
||||
* 查询方式
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
queryType?: string | null;
|
||||
|
||||
/**
|
||||
* 列表显示
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isTable?: boolean;
|
||||
|
||||
/**
|
||||
* 内容复制
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
isCopy?: boolean;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
defaultValue?: string | null;
|
||||
|
||||
/**
|
||||
* @type {CodeGenFromRuleValidEnum}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
fromValid?: CodeGenFromRuleValidEnum;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenColumn
|
||||
*/
|
||||
orderNo?: number;
|
||||
}
|
||||
@ -1,342 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 代码生成字段配置表
|
||||
*
|
||||
* @export
|
||||
* @interface SysCodeGenConfig
|
||||
*/
|
||||
export interface SysCodeGenConfig {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 代码生成主表Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
codeGenId?: number;
|
||||
|
||||
/**
|
||||
* 数据库字段名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
columnName: string;
|
||||
|
||||
/**
|
||||
* 实体属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
propertyName: string;
|
||||
|
||||
/**
|
||||
* 字段数据长度
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
columnLength?: number;
|
||||
|
||||
/**
|
||||
* 字段描述
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
columnComment?: string | null;
|
||||
|
||||
/**
|
||||
* .NET数据类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
netType?: string | null;
|
||||
|
||||
/**
|
||||
* 作用类型(字典)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
effectType?: string | null;
|
||||
|
||||
/**
|
||||
* 外键库标识
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
fkConfigId?: string | null;
|
||||
|
||||
/**
|
||||
* 外键实体名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
fkEntityName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键表名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
fkTableName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键显示字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
fkColumnName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键链接字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
fkLinkColumnName?: string | null;
|
||||
|
||||
/**
|
||||
* 外键显示字段.NET类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
fkColumnNetType?: string | null;
|
||||
|
||||
/**
|
||||
* 字典编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
dictTypeCode?: string | null;
|
||||
|
||||
/**
|
||||
* 是否缩进列表(字典)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
whetherRetract?: string | null;
|
||||
|
||||
/**
|
||||
* 是否必填(字典)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
whetherRequired?: string | null;
|
||||
|
||||
/**
|
||||
* 是否可排序(字典)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
whetherSortable?: string | null;
|
||||
|
||||
/**
|
||||
* 是否是统计字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
statistical?: string | null;
|
||||
|
||||
/**
|
||||
* 是否是分组字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
isGroupBy?: string | null;
|
||||
|
||||
/**
|
||||
* 是否是查询条件
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
queryWhether?: string | null;
|
||||
|
||||
/**
|
||||
* 查询方式
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
queryType?: string | null;
|
||||
|
||||
/**
|
||||
* 列表显示
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
whetherTable?: string | null;
|
||||
|
||||
/**
|
||||
* 增改
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
whetherAddUpdate?: string | null;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
columnKey?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库中类型(物理类型)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
dataType?: string | null;
|
||||
|
||||
/**
|
||||
* 是否通用字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
whetherCommon?: string | null;
|
||||
|
||||
/**
|
||||
* 显示文本字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
displayColumn?: string | null;
|
||||
|
||||
/**
|
||||
* 选中值字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
valueColumn?: string | null;
|
||||
|
||||
/**
|
||||
* 父级字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
pidColumn?: string | null;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
orderNo?: number;
|
||||
|
||||
/**
|
||||
* 字段验证规则
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
rules?: string | null;
|
||||
|
||||
/**
|
||||
* 默认值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenConfig
|
||||
*/
|
||||
defaultValue?: string | null;
|
||||
}
|
||||
@ -12,20 +12,20 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { YesNoEnum } from './yes-no-enum';
|
||||
import { SysCodeGenColumn } from './sys-code-gen-column';
|
||||
/**
|
||||
* 系统租户配置参数表
|
||||
* 代码生成关联表
|
||||
*
|
||||
* @export
|
||||
* @interface SysConfigTenant
|
||||
* @interface SysCodeGenTable
|
||||
*/
|
||||
export interface SysConfigTenant {
|
||||
export interface SysCodeGenTable {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
@ -33,7 +33,7 @@ export interface SysConfigTenant {
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
@ -41,7 +41,7 @@ export interface SysConfigTenant {
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
@ -49,7 +49,7 @@ export interface SysConfigTenant {
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
@ -57,7 +57,7 @@ export interface SysConfigTenant {
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
@ -65,7 +65,7 @@ export interface SysConfigTenant {
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
@ -73,7 +73,7 @@ export interface SysConfigTenant {
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
@ -81,69 +81,79 @@ export interface SysConfigTenant {
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysConfigTenant
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysConfigTenant
|
||||
*/
|
||||
code?: string | null;
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysConfigTenant
|
||||
*/
|
||||
value?: string | null;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof SysConfigTenant
|
||||
*/
|
||||
sysFlag?: YesNoEnum;
|
||||
|
||||
/**
|
||||
* 分组编码
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysConfigTenant
|
||||
*/
|
||||
groupCode?: string | null;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
* 代码生成Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
orderNo?: number;
|
||||
codeGenId: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
* 数据库配置id
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysConfigTenant
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
remark?: string | null;
|
||||
configId?: string | null;
|
||||
|
||||
/**
|
||||
* 租户Id
|
||||
* 数据库表名
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysConfigTenant
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
tenantId?: number | null;
|
||||
tableName?: string | null;
|
||||
|
||||
/**
|
||||
* 表实体名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
entityName?: string | null;
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
moduleName?: string | null;
|
||||
|
||||
/**
|
||||
* 业务名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
busName?: string | null;
|
||||
|
||||
/**
|
||||
* 上级联表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
lastLinkPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 下级联表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
nextLinkPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 关联字段
|
||||
*
|
||||
* @type {Array<SysCodeGenColumn>}
|
||||
* @memberof SysCodeGenTable
|
||||
*/
|
||||
columnList?: Array<SysCodeGenColumn> | null;
|
||||
}
|
||||
@ -1,140 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { CodeGenTypeEnum } from './code-gen-type-enum';
|
||||
import { YesNoEnum } from './yes-no-enum';
|
||||
/**
|
||||
* 代码生成模板配置表
|
||||
*
|
||||
* @export
|
||||
* @interface SysCodeGenTemplate
|
||||
*/
|
||||
export interface SysCodeGenTemplate {
|
||||
|
||||
/**
|
||||
* 雪花Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
id?: number;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 模板文件名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @type {CodeGenTypeEnum}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
type?: CodeGenTypeEnum;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
sysFlag?: YesNoEnum;
|
||||
|
||||
/**
|
||||
* 是否默认
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
isDefault?: boolean | null;
|
||||
|
||||
/**
|
||||
* 输出位置
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
outputFile: string;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
describe: string;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysCodeGenTemplate
|
||||
*/
|
||||
orderNo?: number;
|
||||
}
|
||||
@ -12,9 +12,11 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { DbType } from './db-type';
|
||||
import { SysCodeGenTemplateRelation } from './sys-code-gen-template-relation';
|
||||
import { TableUniqueConfigItem } from './table-unique-config-item';
|
||||
import { CodeGenMethodEnum } from './code-gen-method-enum';
|
||||
import { CodeGenPrintTypeEnum } from './code-gen-print-type-enum';
|
||||
import { CodeGenSceneEnum } from './code-gen-scene-enum';
|
||||
import { SysCodeGenTable } from './sys-code-gen-table';
|
||||
import { TreeWithTableConfigInput } from './tree-with-table-config-input';
|
||||
/**
|
||||
* 代码生成表
|
||||
*
|
||||
@ -96,66 +98,30 @@ export interface SysCodeGen {
|
||||
authorName?: string | null;
|
||||
|
||||
/**
|
||||
* 是否移除表前缀
|
||||
* 作者邮箱
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
tablePrefix?: string | null;
|
||||
email?: string | null;
|
||||
|
||||
/**
|
||||
* 生成方式
|
||||
*
|
||||
* @type {string}
|
||||
* @type {CodeGenMethodEnum}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
generateType?: string | null;
|
||||
generateMethod?: CodeGenMethodEnum;
|
||||
|
||||
/**
|
||||
* 库定位器名
|
||||
*
|
||||
* @type {string}
|
||||
* @type {CodeGenSceneEnum}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
configId?: string | null;
|
||||
scene?: CodeGenSceneEnum;
|
||||
|
||||
/**
|
||||
* 数据库名(保留字段)
|
||||
*
|
||||
* @type {string}
|
||||
* @type {TreeWithTableConfigInput}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
dbName?: string | null;
|
||||
|
||||
/**
|
||||
* @type {DbType}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
dbType?: DbType;
|
||||
|
||||
/**
|
||||
* 数据库链接
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
connectionString?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库表名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
tableName?: string | null;
|
||||
|
||||
/**
|
||||
* 树控件名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
treeName?: string | null;
|
||||
treeConfig?: TreeWithTableConfigInput;
|
||||
|
||||
/**
|
||||
* 命名空间
|
||||
@ -174,12 +140,20 @@ export interface SysCodeGen {
|
||||
busName?: string | null;
|
||||
|
||||
/**
|
||||
* 表唯一字段配置
|
||||
* 模块名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
tableUniqueConfig?: string | null;
|
||||
moduleName?: string | null;
|
||||
|
||||
/**
|
||||
* 是否水平布局
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
isHorizontal?: boolean;
|
||||
|
||||
/**
|
||||
* 是否生成菜单
|
||||
@ -203,7 +177,7 @@ export interface SysCodeGen {
|
||||
* @type {number}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
menuPid?: number | null;
|
||||
menuPid?: number;
|
||||
|
||||
/**
|
||||
* 页面目录
|
||||
@ -214,12 +188,10 @@ export interface SysCodeGen {
|
||||
pagePath?: string | null;
|
||||
|
||||
/**
|
||||
* 支持打印类型
|
||||
*
|
||||
* @type {string}
|
||||
* @type {CodeGenPrintTypeEnum}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
printType?: string | null;
|
||||
printType?: CodeGenPrintTypeEnum;
|
||||
|
||||
/**
|
||||
* 打印模版名称
|
||||
@ -229,86 +201,6 @@ export interface SysCodeGen {
|
||||
*/
|
||||
printName?: string | null;
|
||||
|
||||
/**
|
||||
* 左边树形结构表
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
leftTab?: string | null;
|
||||
|
||||
/**
|
||||
* 左边关联字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
leftKey?: string | null;
|
||||
|
||||
/**
|
||||
* 左边关联主表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
leftPrimaryKey?: string | null;
|
||||
|
||||
/**
|
||||
* 左边树名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
leftName?: string | null;
|
||||
|
||||
/**
|
||||
* 下表名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
bottomTab?: string | null;
|
||||
|
||||
/**
|
||||
* 下表关联字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
bottomKey?: string | null;
|
||||
|
||||
/**
|
||||
* 下表关联主表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
bottomPrimaryKey?: string | null;
|
||||
|
||||
/**
|
||||
* 模板文件夹
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
template?: string | null;
|
||||
|
||||
/**
|
||||
* 表类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
tabType?: string | null;
|
||||
|
||||
/**
|
||||
* 树控件PidKey字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
treeKey?: string | null;
|
||||
|
||||
/**
|
||||
* 是否使用 Api Service
|
||||
*
|
||||
@ -318,18 +210,18 @@ export interface SysCodeGen {
|
||||
isApiService?: boolean;
|
||||
|
||||
/**
|
||||
* 模板关系:SysCodeGenTemplateRelation表中的CodeGenId,注意禁止给CodeGenTemplateRelations手动赋值
|
||||
* 关联表
|
||||
*
|
||||
* @type {Array<SysCodeGenTemplateRelation>}
|
||||
* @type {Array<SysCodeGenTable>}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
codeGenTemplateRelations?: Array<SysCodeGenTemplateRelation> | null;
|
||||
tableList?: Array<SysCodeGenTable> | null;
|
||||
|
||||
/**
|
||||
* 表唯一字段列表
|
||||
* 简拼
|
||||
*
|
||||
* @type {Array<TableUniqueConfigItem>}
|
||||
* @type {string}
|
||||
* @memberof SysCodeGen
|
||||
*/
|
||||
tableUniqueList?: Array<TableUniqueConfigItem> | null;
|
||||
pinyin?: string | null;
|
||||
}
|
||||
|
||||
@ -131,12 +131,6 @@ export interface SysDictType {
|
||||
*/
|
||||
sysFlag?: YesNoEnum;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof SysDictType
|
||||
*/
|
||||
isTenant?: YesNoEnum;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof SysDictType
|
||||
|
||||
@ -85,7 +85,7 @@ export interface SysFile {
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 创建者部门Id
|
||||
* 创建者机构Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof SysFile
|
||||
@ -93,7 +93,7 @@ export interface SysFile {
|
||||
createOrgId?: number | null;
|
||||
|
||||
/**
|
||||
* 创建者部门名称
|
||||
* 创建者机构名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SysFile
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* 微信退款表
|
||||
* 系统微信退款表
|
||||
*
|
||||
* @export
|
||||
* @interface SysWechatRefund
|
||||
|
||||
@ -69,7 +69,7 @@ export interface TableOutput {
|
||||
tableComment?: string | null;
|
||||
|
||||
/**
|
||||
* 表字段个数
|
||||
* 字段个数
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof TableOutput
|
||||
@ -77,7 +77,7 @@ export interface TableOutput {
|
||||
columnCount?: number;
|
||||
|
||||
/**
|
||||
* 程序集名称
|
||||
* 所属程序集名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TableOutput
|
||||
|
||||
@ -0,0 +1,134 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Admin.NET 通用权限开发平台
|
||||
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 单表带树组件模板配置输入参数
|
||||
*
|
||||
* @export
|
||||
* @interface TreeWithTableConfigInput
|
||||
*/
|
||||
export interface TreeWithTableConfigInput {
|
||||
|
||||
/**
|
||||
* 外键库标识
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
configId: string;
|
||||
|
||||
/**
|
||||
* 外键实体名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
entityName: string;
|
||||
|
||||
/**
|
||||
* 外键表名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
tableName: string;
|
||||
|
||||
/**
|
||||
* 表注释
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
tableComment: string;
|
||||
|
||||
/**
|
||||
* 外键显示属性名(多选)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
displayPropertyNames: string;
|
||||
|
||||
/**
|
||||
* 外键属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
linkPropertyName: string;
|
||||
|
||||
/**
|
||||
* 外键显示属性.NET类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
linkPropertyType: string;
|
||||
|
||||
/**
|
||||
* 用于检索的属性名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
searchPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 用于检索的属性.NET类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
searchPropertyType?: string | null;
|
||||
|
||||
/**
|
||||
* 是否使用表格
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
useTable?: boolean;
|
||||
|
||||
/**
|
||||
* 是否多选
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
multiple?: boolean;
|
||||
|
||||
/**
|
||||
* 父属性名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
parentPropertyName?: string | null;
|
||||
|
||||
/**
|
||||
* 父属性.NET类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
parentPropertyType?: string | null;
|
||||
|
||||
/**
|
||||
* 树标题
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof TreeWithTableConfigInput
|
||||
*/
|
||||
treeTitle: string;
|
||||
}
|
||||
@ -12,8 +12,11 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Filter } from './filter';
|
||||
import { Search } from './search';
|
||||
import { AddSysCodeGenTable } from './add-sys-code-gen-table';
|
||||
import { CodeGenMethodEnum } from './code-gen-method-enum';
|
||||
import { CodeGenPrintTypeEnum } from './code-gen-print-type-enum';
|
||||
import { CodeGenSceneEnum } from './code-gen-scene-enum';
|
||||
import { EffectTreeConfigInput } from './effect-tree-config-input';
|
||||
/**
|
||||
*
|
||||
*
|
||||
@ -23,152 +26,106 @@ import { Search } from './search';
|
||||
export interface UpdateCodeGenInput {
|
||||
|
||||
/**
|
||||
* @type {Search}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
search?: Search;
|
||||
|
||||
/**
|
||||
* 模糊查询关键字
|
||||
* 创建时间
|
||||
*
|
||||
* @type {string}
|
||||
* @type {Date}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
keyword?: string | null;
|
||||
createTime?: Date;
|
||||
|
||||
/**
|
||||
* @type {Filter}
|
||||
* 更新时间
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
filter?: Filter;
|
||||
updateTime?: Date | null;
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
* 创建者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
page?: number;
|
||||
createUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 页码容量
|
||||
* 创建者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
createUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 修改者Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
pageSize?: number;
|
||||
updateUserId?: number | null;
|
||||
|
||||
/**
|
||||
* 排序字段
|
||||
* 修改者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
field?: string | null;
|
||||
updateUserName?: string | null;
|
||||
|
||||
/**
|
||||
* 排序方向
|
||||
* 软删除
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
isDelete?: boolean;
|
||||
|
||||
/**
|
||||
* 作者姓名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
order?: string | null;
|
||||
authorName?: string | null;
|
||||
|
||||
/**
|
||||
* 降序排序
|
||||
* 作者邮箱
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
descStr?: string | null;
|
||||
email?: string | null;
|
||||
|
||||
/**
|
||||
* 类名
|
||||
* @type {EffectTreeConfigInput}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
treeConfig?: EffectTreeConfigInput;
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
className?: string | null;
|
||||
moduleName?: string | null;
|
||||
|
||||
/**
|
||||
* 是否移除表前缀
|
||||
* 是否水平布局
|
||||
*
|
||||
* @type {string}
|
||||
* @type {boolean}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
tablePrefix?: string | null;
|
||||
isHorizontal?: boolean;
|
||||
|
||||
/**
|
||||
* 库定位器名
|
||||
* 是否生成菜单
|
||||
*
|
||||
* @type {string}
|
||||
* @type {boolean}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
configId?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库名(保留字段)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
dbName?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
dbType?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库链接
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
connectionString?: string | null;
|
||||
|
||||
/**
|
||||
* 树控件名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
treeName?: string | null;
|
||||
|
||||
/**
|
||||
* 树控件key
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
treeKey?: string | null;
|
||||
|
||||
/**
|
||||
* 功能名(数据库表名称)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
tableComment?: string | null;
|
||||
|
||||
/**
|
||||
* 菜单应用分类(应用编码)
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
menuApplication?: string | null;
|
||||
|
||||
/**
|
||||
* 菜单父级
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
menuPid?: number | null;
|
||||
generateMenu?: boolean;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
@ -179,20 +136,12 @@ export interface UpdateCodeGenInput {
|
||||
menuIcon?: string | null;
|
||||
|
||||
/**
|
||||
* 页面目录
|
||||
* 菜单编码
|
||||
*
|
||||
* @type {string}
|
||||
* @type {number}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
pagePath?: string | null;
|
||||
|
||||
/**
|
||||
* 支持打印类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
printType?: string | null;
|
||||
menuPid?: number;
|
||||
|
||||
/**
|
||||
* 打印模版名称
|
||||
@ -203,20 +152,40 @@ export interface UpdateCodeGenInput {
|
||||
printName?: string | null;
|
||||
|
||||
/**
|
||||
* 数据库表名
|
||||
* 是否使用 Api Service
|
||||
*
|
||||
* @type {string}
|
||||
* @type {boolean}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
tableName: string;
|
||||
isApiService?: boolean;
|
||||
|
||||
/**
|
||||
* 业务名(业务代码包名称)
|
||||
* 关联表
|
||||
*
|
||||
* @type {Array<AddSysCodeGenTable>}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
tableList: Array<AddSysCodeGenTable>;
|
||||
|
||||
/**
|
||||
* 简拼
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
busName: string;
|
||||
pinyin?: string | null;
|
||||
|
||||
/**
|
||||
* @type {CodeGenMethodEnum}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
generateMethod?: CodeGenMethodEnum;
|
||||
|
||||
/**
|
||||
* @type {CodeGenSceneEnum}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
scene?: CodeGenSceneEnum;
|
||||
|
||||
/**
|
||||
* 命名空间
|
||||
@ -227,116 +196,26 @@ export interface UpdateCodeGenInput {
|
||||
nameSpace: string;
|
||||
|
||||
/**
|
||||
* 作者姓名
|
||||
* 业务名
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
authorName: string;
|
||||
busName: string;
|
||||
|
||||
/**
|
||||
* 生成方式
|
||||
* 页面目录
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
generateType: string;
|
||||
pagePath: string;
|
||||
|
||||
/**
|
||||
* 是否生成菜单
|
||||
*
|
||||
* @type {boolean}
|
||||
* @type {CodeGenPrintTypeEnum}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
generateMenu: boolean;
|
||||
|
||||
/**
|
||||
* 是否使用 Api Service
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
isApiService?: boolean;
|
||||
|
||||
/**
|
||||
* 模板Id集合
|
||||
*
|
||||
* @type {Array<number>}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
codeGenTemplateIds?: Array<number> | null;
|
||||
|
||||
/**
|
||||
* 左边树形结构表
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
leftTab?: string | null;
|
||||
|
||||
/**
|
||||
* 左边关联字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
leftKey?: string | null;
|
||||
|
||||
/**
|
||||
* 左边关联主表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
leftPrimaryKey?: string | null;
|
||||
|
||||
/**
|
||||
* 左边树Name
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
leftName?: string | null;
|
||||
|
||||
/**
|
||||
* 下表名称
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
bottomTab?: string | null;
|
||||
|
||||
/**
|
||||
* 下表关联字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
bottomKey?: string | null;
|
||||
|
||||
/**
|
||||
* 下表关联主表字段
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
bottomPrimaryKey?: string | null;
|
||||
|
||||
/**
|
||||
* 模板
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
template?: string | null;
|
||||
|
||||
/**
|
||||
* 表类型
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof UpdateCodeGenInput
|
||||
*/
|
||||
tabType?: string | null;
|
||||
printType?: CodeGenPrintTypeEnum;
|
||||
|
||||
/**
|
||||
* 代码生成器Id
|
||||
|
||||
@ -125,12 +125,6 @@ export interface UpdateDictTypeInput {
|
||||
*/
|
||||
status?: StatusEnum;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof UpdateDictTypeInput
|
||||
*/
|
||||
isTenant?: YesNoEnum;
|
||||
|
||||
/**
|
||||
* @type {YesNoEnum}
|
||||
* @memberof UpdateDictTypeInput
|
||||
|
||||
@ -67,4 +67,12 @@ export interface UploadFileFromBase64Input {
|
||||
* @memberof UploadFileFromBase64Input
|
||||
*/
|
||||
isPublic?: boolean;
|
||||
|
||||
/**
|
||||
* 业务Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof UploadFileFromBase64Input
|
||||
*/
|
||||
dataId?: number | null;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user