namespace Admin.Core.Common.Configs
{
///
/// 租户类型
///
public enum TenantType
{
///
/// 无租户
///
None,
///
/// 共享数据库
///
Share,
///
/// 独立数据库
///
Own
}
///
/// 应用配置
///
public class AppConfig
{
///
/// Api地址,默认 http://*:8000
///
public string[] Urls { get; set; }// = new[]{ "http://*:8000" };
///
/// 跨域地址,默认 http://*:9000
///
public string[] CorUrls { get; set; }// = new[]{ "http://*:9000" };
///
/// 租户类型
///
public TenantType TenantType { get; set; } = TenantType.None;
///
/// Swagger文档
///
public bool Swagger { 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 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" };
}
}