调整项目依赖
This commit is contained in:
53
common/Tnb.SqlSugar/Options/ConnectionConfigOptions.cs
Normal file
53
common/Tnb.SqlSugar/Options/ConnectionConfigOptions.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
namespace SqlSugar;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库连接字符串配置选项.
|
||||
/// </summary>
|
||||
public class ConnectionConfigOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置ID.
|
||||
/// </summary>
|
||||
public string ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否自定义配置.
|
||||
/// </summary>
|
||||
public bool IsCustom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否主从分离.
|
||||
/// </summary>
|
||||
public bool IsMasterSlaveSeparation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 配置列表.
|
||||
/// </summary>
|
||||
public List<DBConnectionConfig> ConfigList { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据库连接字符串配置.
|
||||
/// </summary>
|
||||
public class DBConnectionConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否主库.
|
||||
/// </summary>
|
||||
public bool IsMaster { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库名.
|
||||
/// </summary>
|
||||
public string ServiceName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库类型.
|
||||
/// </summary>
|
||||
public DbType dbType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义连接语句.
|
||||
/// </summary>
|
||||
public string connectionStr { get; set; }
|
||||
}
|
||||
49
common/Tnb.SqlSugar/Options/ConnectionStringsOptions.cs
Normal file
49
common/Tnb.SqlSugar/Options/ConnectionStringsOptions.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using JNPF.ConfigurableOptions;
|
||||
|
||||
namespace SqlSugar;
|
||||
|
||||
/// <summary>
|
||||
/// 数据库配置.
|
||||
/// </summary>
|
||||
public sealed class ConnectionStringsOptions : IConfigurableOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认数据库编号.
|
||||
/// </summary>
|
||||
public string ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库类型.
|
||||
/// </summary>
|
||||
public string DBType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库名称.
|
||||
/// </summary>
|
||||
public string DBName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库地址.
|
||||
/// </summary>
|
||||
public string Host { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库端口号.
|
||||
/// </summary>
|
||||
public int Port { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 账号.
|
||||
/// </summary>
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 密码.
|
||||
/// </summary>
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 默认数据库连接字符串.
|
||||
/// </summary>
|
||||
public string DefaultConnection { get; set; }
|
||||
}
|
||||
19
common/Tnb.SqlSugar/Options/TenantOptions.cs
Normal file
19
common/Tnb.SqlSugar/Options/TenantOptions.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using JNPF.ConfigurableOptions;
|
||||
|
||||
namespace SqlSugar;
|
||||
|
||||
/// <summary>
|
||||
/// 租户配置.
|
||||
/// </summary>
|
||||
public sealed class TenantOptions : IConfigurableOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否多租户模式.
|
||||
/// </summary>
|
||||
public bool MultiTenancy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 多租户数据接口.
|
||||
/// </summary>
|
||||
public string MultiTenancyDBInterFace { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user