<?php
/**
 * Created by PhpStorm.
 * User: leo
 * Date: 2018/2/23
 * Time: 下午3:53
 */
return [
    // 奖金结算系统主库
    'db' => [
        // 数据库连接
        'dsn' => 'oci:dbname=//192.168.0.253:1522/orclbonus;charset=utf8',
        // 数据库用户名
        'username' => 'c##bonusdb',
        // 数据库密码
        'password' => '123456',
        // 数据库字符集
        'charset' => 'utf8',
        // 数据表前缀
        'tablePrefix' => 'AR_',
    ],
    // 商城系统主库
    'dbShop' => [
        'dsn' => 'oci:dbname=//192.168.0.253:1521/orclshop;charset=utf8',
        'username' => 'c##shopdb',
        'password' => '123456',
        'charset' => 'utf8',
        'tablePrefix' => 'AR_',
    ],
    // 日志库
    'dbLog' => [
        'dsn' => 'mongodb://@192.168.0.253:27017/anran_bonus_log',
        'options' => [
            "username" => "anran_bonus_log_user",
            "password" => "123456"
        ],
    ],
    // 奖金结算专属库(为不占用主库资源，不影响会员正常业务，该库专门用于奖金结算，可单独架设，需与主库做主从同步)
    'dbCalc' => [
        'dsn' => 'oci:dbname=//192.168.0.253:1522/orclbonus;charset=utf8',
        'username' => 'c##bonusdb',
        'password' => '123456',
        'charset' => 'utf8',
        'tablePrefix' => 'AR_',
    ],
    // 商城用于结算的专属从库(为不占用系统主库资源，不影响会员的正常业务，该库专门用于奖金结算时从商城从库查询报单和订货单，可单独假设，需与商城主库做主从同步)
    'dbShopCalc' => [
        'dsn' => 'oci:dbname=//192.168.0.253:1521/orclshop;charset=utf8',
        'username' => 'c##shopdb',
        'password' => '123456',
        'charset' => 'utf8',
        'tablePrefix' => 'AR_',
    ],
    // 移动点位时专用的点位备份库(可用来查看各个时期的会员点位情况)
    'dbNetPoint' => [
        'dsn' => 'oci:dbname=//192.168.0.253:1522/orclnet;charset=utf8',
        'username' => 'c##netdb',
        'password' => '123456',
        'charset' => 'utf8',
        'tablePrefix' => 'AR_',
    ],
    // 系统从库
    'slavesDb' => [
        'slaveConfig' => [
            'username' => 'c##bonusslave',
            'password' => '123456',
            'charset' => 'utf8',
            'tablePrefix' => 'AR_',
            'attributes' => [
                PDO::ATTR_TIMEOUT => 10,  // 从库超时切换间隔时间
            ],
        ],
        'slaves' => [
            ['dsn' => 'oci:dbname=//192.168.0.253:1522/orclbonusslave;charset=utf8'],
            // 其他奖金结算系统的从库从下面继续添加配置
        ],
    ],
    // Token专用 Redis 库
    'tokenRedis' => [
        // 服务器
        'hostname' => 'localhost',
        // 端口
        'port' => 6379,
        // 密码
        'password' => '123456',
        // 库索引
        'database' => 1,
    ],
    // 缓存专用 Redis 库
    'cacheRedis' => [
        'hostname' => 'localhost',
        'port' => 6379,
        'password' => '123456',
        'database' => 3,
    ],
    // 其他数据 Redis 库
    'otherRedis' => [
        'hostname' => 'localhost',
        'port' => 6379,
        'password' => '123456',
        'database' => 5,
    ],
    // 远程静态上传服务器地址
    'remoteUploadHost' => 'http://localhost:9017',
    'idCardVerify' => [
        'host' => 'http://121.40.238.29:20000',
        'clientId' => '122371433052508160',
    ],
    // swoole异步服务器及端口
    'swooleTimerConfig' => [
        'host' => '127.0.0.1',
        'port' => '9513',
    ],
    // swoole的RPC服务器及端口
    'swooleRPCConfig' => [
        'host' => '127.0.0.1',
        'port' => '9515',
        'ipWhiteList' => [],
        'username' => 'test',
        'password' => 'ttt',
    ],
];