{
  "DbConfig": {
    //数据库注册键
    "key": "appdb",
    //程序集名称，自动获取实体表，为空则通过ConfigureFreeSql自定义配置
    "assemblyNames": [ "NPP.SmartSchedue.Api" ],

    //监听所有操作
    "monitorCommand": true,
    //监听Curd操作
    "curd": true,
    //监听同步结构脚本
    "syncStructureSql": false,
    //监听同步数据Curd操作
    "syncDataCurd": false,

    //建库
    "createDb": false,
    //SqlServer,PostgreSQL,Oracle,OdbcOracle,OdbcSqlServer,OdbcMySql,OdbcPostgreSQL,Odbc,OdbcDameng,MsAccess
    //建库连接字符串
    //MySql "Server=localhost; Port=3306; Database=mysql; Uid=root; Pwd=pwd; Charset=utf8mb4;"
    //SqlServer "Data Source=.;Integrated Security=True;Initial Catalog=master;Encrypt=True;TrustServerCertificate=True;Pooling=true;Min Pool Size=1"
    //PostgreSQL "Host=localhost;Port=5432;Username=postgres;Password=; Database=postgres;Pooling=true;Minimum Pool Size=1"
    //Oracle "user id=SYS;password=pwd; data source=//127.0.0.1:1521/XE;Pooling=true;Min Pool Size=1"
    "createDbConnectionString": "Server=10.249.11.115; Port=3306; Database=mysql; Uid=root; Pwd=Wulihui1031; Charset=utf8mb4;SslMode=none;Min pool size=1;Allow User Variables=True",
    //建库脚本，复杂建库脚本可放到createdbsql.txt中
    //MySql "CREATE DATABASE `appdb` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'"
    //SqlServer "CREATE DATABASE [appdb]"
    //PostgreSQL "CREATE DATABASE \"appdb\" WITH ENCODING = 'UTF8'"
    "createDbSql": "CREATE DATABASE `appdb` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci'",

    //同步结构
    "syncStructure": true,
    //同步结构批次实体数
    "syncStructureEntityBatchSize": 1,
    //同步数据
    "syncData": true,
    //同步更新数据
    "sysUpdateData": true,
    ////同步数据地址
    "SyncDataPath": "InitData/App",
    //同步所有表["base_dict_type", "base_dict", "base_user",  "base_user_staff", "base_org", "base_role", "base_api", "base_view", "base_permission", "base_permission_api", "base_user_role", "base_user_org", "base_role_permission", "base_tenant", "base_tenant_permission"]
    //同步指定表["base_api", "base_view", "base_permission", "base_permission_api"]
    //同步数据包含表，指定表同步，不填同步所有表
    "syncDataIncludeTables": [],
    //同步排除表["base_user"]
    //同步数据排除表，指定表不同步
    "syncDataExcludeTables": [],
    //同步数据操作用户
    "syncDataUser": {
      "id": 161223411986501,
      "userName": "admin",
      "name": "管理员",
      "tenantId": 161223412138053
    },

    //项目初始化不开启生成数据，发布生产环境前，如果开发环境有配置数据需要更新数据包，可以开启生成数据包，使用完记得关闭
    //开启生成数据前先关闭syncStructure syncData createDb
    //生成数据
    "generateData": false,

    //数据库配置 https://github.com/dotnetcore/FreeSql/wiki/入门
    //连接字符串语法 https://www.connectionstrings.com
    //数据库类型 MySql = 0, SqlServer = 1, PostgreSQL = 2, Oracle = 3, Sqlite = 4, OdbcOracle = 5, OdbcSqlServer = 6, OdbcMySql = 7, OdbcPostgreSQL = 8, Odbc = 9, OdbcDameng = 10, MsAccess = 11, Dameng = 12, OdbcKingbaseES = 13, ShenTong = 14, KingbaseES = 15, Firebird = 16
    "type": "MySql",

    //连接字符串
    //MySql "Server=localhost; Port=3306; Database=appdb; Uid=root; Pwd=pwd; Charset=utf8mb4;"
    //SqlServer "Data Source=.;Integrated Security=True;Initial Catalog=appdb;Encrypt=True;TrustServerCertificate=True;Pooling=true;Min Pool Size=1"
    //PostgreSQL "Host=localhost;Port=5432;Username=postgres;Password=; Database=appdb;Pooling=true;Minimum Pool Size=1"
    //Sqlite "Data Source=|DataDirectory|\\appdb.db; Pooling=true;Min Pool Size=1"
    //"Oracle" "user id=SYS;password=pwd; data source=//127.0.0.1:1521/XE;Pooling=true;Min Pool Size=1",
    "connectionString": "Server=10.249.11.115; Port=3306; Database=admindb_dev; Uid=root; Pwd=root123$%^; Charset=utf8mb4;SslMode=none;Min pool size=1;Allow User Variables=True",

    //指定程序集
    //FreeSql.MySql.MySqlProvider`1,FreeSql.Provider.MySqlConnector
    "providerType": "",

    //读写分离从库列表
    "slaveList": [
      //{
      //  //权重
      //  "Weight": 1,
      //  //连接字符串
      //  "ConnectionString": "Data Source=|DataDirectory|\\appdb.db; Pooling=true;Min Pool Size=1"
      //}
    ],

    //空闲时间（分），设置idleTime=0则不自动回收, 设置1天不使用则自动回收
    "idleTime": 1440,

    //新增时强制更新EntityUpdate数据
    "forceUpdate": false,

    //多数据库
    //Core/Consts定义DbKeys枚举
    //使用仓储访问 public ModuleRepository(UnitOfWorkManagerCloud muowm) : base(DbKeys.appdb, muowm)
    //使用FreeSqlCloud访问  freeSqlCloud.Use(DbKeys.appdb);
    "dbs": [
    ]
  }
}