2023-08-26 04:41:01 +00:00
|
|
|
namespace BotSharp.Abstraction.Repositories;
|
|
|
|
|
|
2023-09-01 22:33:36 +00:00
|
|
|
public class BotSharpDatabaseSettings : DatabaseBasicSettings
|
2023-08-26 04:41:01 +00:00
|
|
|
{
|
2024-12-01 17:38:17 +00:00
|
|
|
public string[] Assemblies { get; set; } = [];
|
|
|
|
|
public string FileRepository { get; set; } = string.Empty;
|
|
|
|
|
public string BotSharpMongoDb { get; set; } = string.Empty;
|
|
|
|
|
public string TablePrefix { get; set; } = string.Empty;
|
|
|
|
|
public DbConnectionSetting BotSharp { get; set; } = new();
|
|
|
|
|
public string Redis { get; set; } = string.Empty;
|
|
|
|
|
public bool EnableReplica { get; set; } = true;
|
2023-08-26 04:41:01 +00:00
|
|
|
}
|
|
|
|
|
|
2023-09-01 22:33:36 +00:00
|
|
|
public class DatabaseBasicSettings
|
2023-08-26 04:41:01 +00:00
|
|
|
{
|
2024-12-01 17:38:17 +00:00
|
|
|
public string Default { get; set; } = string.Empty;
|
|
|
|
|
public DbConnectionSetting DefaultConnection { get; set; } = new();
|
2023-08-26 04:41:01 +00:00
|
|
|
public bool EnableSqlLog { get; set; }
|
|
|
|
|
public bool EnableSensitiveDataLogging { get; set; }
|
|
|
|
|
public bool EnableRetryOnFailure { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class DbConnectionSetting
|
|
|
|
|
{
|
|
|
|
|
public string Master { get; set; }
|
|
|
|
|
public string[] Slavers { get; set; }
|
2024-12-01 17:38:17 +00:00
|
|
|
public int ConnectionTimeout { get; set; } = 30;
|
|
|
|
|
public int ExecutionTimeout { get; set; } = 30;
|
2023-08-26 04:41:01 +00:00
|
|
|
|
|
|
|
|
public DbConnectionSetting()
|
|
|
|
|
{
|
2024-12-01 17:38:17 +00:00
|
|
|
Slavers = [];
|
2023-08-26 04:41:01 +00:00
|
|
|
}
|
2024-07-22 04:58:40 +00:00
|
|
|
}
|