using SqlSugar;
using ArgumentException = System.ArgumentException;
namespace Yi.Framework.SqlSugarCore.Abstractions
{
///
/// 数据库连接配置选项
///
public class DbConnOptions
{
///
/// 主数据库连接字符串
/// 如果开启多租户,此为默认租户数据库
///
public string? Url { get; set; }
///
/// 数据库类型
///
public DbType? DbType { get; set; }
///
/// 是否启用种子数据初始化
///
public bool EnabledDbSeed { get; set; } = false;
///
/// 是否启用驼峰命名转下划线命名
///
public bool EnableUnderLine { get; set; } = false;
///
/// 是否启用Code First模式
///
public bool EnabledCodeFirst { get; set; } = false;
///
/// 是否启用SQL日志记录
///
public bool EnabledSqlLog { get; set; } = true;
///
/// 实体类所在程序集名称列表
///
public List? EntityAssembly { get; set; }
///
/// 是否启用读写分离
///
public bool EnabledReadWrite { get; set; } = false;
///
/// 只读数据库连接字符串列表
///
public List? ReadUrl { get; set; }
///
/// 是否启用SaaS多租户
///
public bool EnabledSaasMultiTenancy { get; set; } = false;
///
/// 是否开启更新并发乐观锁
///
public bool EnabledConcurrencyException { get;set; } = false;
}
}