using System.Collections.Generic;
namespace ZhonTai.Admin.Core.Configs;
///
/// 应用配置
///
public class AppConfig
{
public AppType AppType { get; set; } = AppType.Controllers;
///
/// Api地址,默认 http://*:8000
///
public string[] Urls { get; set; }
///
/// 跨域地址,默认 http://*:9000
///
public string[] CorUrls { get; set; }
///
/// 程序集名称,默认 ZhonTai.Admin
///
public string[] AssemblyNames { get; set; }
///
/// 租户类型
///
public bool Tenant { get; set; } = false;
///
/// Swagger文档
///
public SwaggerConfig Swagger { get; set; } = new SwaggerConfig();
///
/// 新版Api文档
///
public ApiUIConfig ApiUI { get; set; } = new ApiUIConfig();
///
/// MiniProfiler性能分析器
///
public bool MiniProfiler { get; set; } = false;
///
/// 统一认证授权服务器
///
public IdentityServer IdentityServer { get; set; } = new IdentityServer();
///
/// Aop配置
///
public AopConfig Aop { get; set; } = new AopConfig();
///
/// 日志配置
///
public LogConfig Log { get; set; } = new LogConfig();
///
/// 限流
///
public bool RateLimit { get; set; } = false;
///
/// 验证码配置
///
public VarifyCodeConfig VarifyCode { get; set; } = new VarifyCodeConfig();
///
/// 默认密码
///
public string DefaultPassword { get; set; } = "111111";
}
///
/// Swagger配置
///
public class SwaggerConfig
{
///
/// 启用
///
public bool Enable { get; set; } = false;
///
/// 地址
///
public string Url { get; set; }
///
/// 项目列表
///
public List Projects { get; set; }
}
///
///新版Api文档配置
///
public class ApiUIConfig
{
///
/// 启用
///
public bool Enable { get; set; } = false;
public SwaggerFooterConfig Footer { get; set; } = new SwaggerFooterConfig();
}
///
/// Swagger页脚配置
///
public class SwaggerFooterConfig
{
///
/// 启用
///
public bool Enable { get; set; } = true;
///
/// 内容
///
public string Content { get; set; }
}
///
/// 统一认证授权服务器配置
///
public class IdentityServer
{
///
/// 启用
///
public bool Enable { get; set; } = false;
///
/// 地址
///
public string Url { get; set; } = "https://localhost:5000";
}
///
/// Aop配置
///
public class AopConfig
{
///
/// 事物
///
public bool Transaction { get; set; } = true;
}
///
/// 日志配置
///
public class LogConfig
{
///
/// 操作日志
///
public bool Operation { get; set; } = true;
}
///
/// 验证码配置
///
public class VarifyCodeConfig
{
///
/// 启用
///
public bool Enable { get; set; } = true;
///
/// 操作日志
///
public string[] Fonts { get; set; }// = new[] { "Times New Roman", "Verdana", "Arial", "Gungsuh", "Impact" };
}
///
/// 项目配置
///
public class ProjectConfig
{
///
/// 名称
///
public string Name { get; set; }
///
/// 编码
///
public string Code { get; set; }
///
/// 版本
///
public string Version { get; set; }
///
/// 描述
///
public string Description { get; set; }
}
///
/// 应用程序类型
///
public enum AppType
{
Controllers,
ControllersWithViews,
MVC
}