@@ -2,18 +2,19 @@ namespace BotSharp.Abstraction.Repositories;
22
33public class BotSharpDatabaseSettings : DatabaseBasicSettings
44{
5- public string [ ] Assemblies { get ; set ; }
6- public string FileRepository { get ; set ; }
7- public string BotSharpMongoDb { get ; set ; }
8- public string TablePrefix { get ; set ; }
9- public DbConnectionSetting BotSharp { get ; set ; }
10- public string Redis { get ; set ; }
5+ public string [ ] Assemblies { get ; set ; } = [ ] ;
6+ public string FileRepository { get ; set ; } = string . Empty ;
7+ public string BotSharpMongoDb { get ; set ; } = string . Empty ;
8+ public string TablePrefix { get ; set ; } = string . Empty ;
9+ public DbConnectionSetting BotSharp { get ; set ; } = new ( ) ;
10+ public string Redis { get ; set ; } = string . Empty ;
11+ public bool EnableReplica { get ; set ; } = true ;
1112}
1213
1314public class DatabaseBasicSettings
1415{
15- public string Default { get ; set ; }
16- public DbConnectionSetting DefaultConnection { get ; set ; }
16+ public string Default { get ; set ; } = string . Empty ;
17+ public DbConnectionSetting DefaultConnection { get ; set ; } = new ( ) ;
1718 public bool EnableSqlLog { get ; set ; }
1819 public bool EnableSensitiveDataLogging { get ; set ; }
1920 public bool EnableRetryOnFailure { get ; set ; }
@@ -23,9 +24,11 @@ public class DbConnectionSetting
2324{
2425 public string Master { get ; set ; }
2526 public string [ ] Slavers { get ; set ; }
27+ public int ConnectionTimeout { get ; set ; } = 30 ;
28+ public int ExecutionTimeout { get ; set ; } = 30 ;
2629
2730 public DbConnectionSetting ( )
2831 {
29- Slavers = new string [ 0 ] ;
32+ Slavers = [ ] ;
3033 }
3134}
0 commit comments