dataSources:
  wallet:
    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
    driverClassName: com.mysql.jdbc.Driver
    # com.p6spy.engine.spy.P6SpyDriver
    # com.mysql.jdbc.Driver
    jdbcUrl: jdbc:p6spy:mysql://dev-mysql-rds.chffwcegvu9y.ap-southeast-1.rds.amazonaws.com:3306/aswat_all?characterEncoding=utf8&useUnicode=true&useSSL=false&allowMultiQueries=true&useLegacyDatetimeCode=false&serverTimezone=UTC&allowPublicKeyRetrieval=true&autoReconnect=true
    username: aswatall
    password: sTJPgeuvqQrCKCtE
    #hikari:
    # 连接池名称
    poolName: WalletDbPool
    #最小空闲连接数量
    minimumIdle: 5
    # 空闲连接存活最大时间，默认600000（10分钟）
    idleTimeout: 180000
    # 连接池最大连接数，默认是10 推荐的公式：((core_count * 2) + effective_spindle_count)
    maximumPoolSize: 10
    # 此属性控制从池返回的连接的默认自动提交行为,默认值：true
    autoCommit: true
    # 此属性控制池中连接的最长生命周期，值0表示无限生命周期，默认1800000即30分钟
    maxLifetime: 1800000
    # 数据库连接超时时间,默认30秒，即30000
    connectionTimeout: 30000
    connectionTestQuery: SELECT 1
props:
  sql-show: true

rules:
  - !SHARDING
    tables:
      wallet_gold_asset_record:
        actualDataNodes: wallet.wallet_gold_asset_record_${1..12}
        tableStrategy:
          standard:
            shardingColumn: create_time
            shardingAlgorithmName: wallet_gold_asset_record_inline
    shardingAlgorithms:
      wallet_gold_asset_record_inline:
        type: CLASS_BASED
        props:
          strategy: standard
          algorithmClassName: com.red.circle.framework.shardingsphere.sharding.TimeMonthShardingAlgorithm

rules:
- !SHADOW
  dataSources:
    shadowDataSource:
      productionDataSourceName: # 生产数据源名称
      shadowDataSourceName: # 影子数据源名称
  tables:
    <table_name>:
      dataSourceNames: # 影子表关联影子数据源名称列表
        - <shadow_data_source>
      shadowAlgorithmNames: # 影子表关联影子算法名称列表
        - <shadow_algorithm_name>
  defaultShadowAlgorithmName: # 默认影子算法名称（选配项）
  shadowAlgorithms:
    <shadow_algorithm_name> (+): # 影子算法名称
      type: # 影子算法类型
      props: # 影子算法属性配置
