<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
use function Hyperf\Support\env;

return [
    'default' => [
        'driver' => env('DB_DRIVER', 'pgsql'),
        'host' => env('DB_HOST', '127.0.0.1'),
        'database' => env('DB_DATABASE', 'datahub'),
        'port' => env('DB_PORT', 5416),
        'username' => env('DB_USERNAME', 'datahub'),
        'password' => env('DB_PASSWORD', 'datahub'),
        'charset' => env('DB_CHARSET', 'utf8'),
        'collation' => env('DB_COLLATION', 'utf8_unicode_ci'),
        'prefix' => env('DB_PREFIX', ''),
        'schema' => env('DB_SCHEMA', 'public'),
        'timezone' => env('DB_TIMEZONE', 'Asia/Shanghai'),
        'sslmode' => env('DB_SSL_MODE', 'prefer'),
        'pool' => [
            'min_connections' => 1,
            'max_connections' => 10,
            'connect_timeout' => 10.0,
            'wait_timeout' => 3.0,
            'heartbeat' => -1,
            'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60),
        ],
        'commands' => [
            'gen:model' => [
                'path' => 'app/Model',
                'force_casts' => true,
                'inheritance' => 'Model',
            ],
        ],
    ],
    'raw' => [
        'driver' => 'mysql',
        'host' => '127.0.0.1',
        'port' => 3380,
        'database' => 'wpic_task',
        'username' => 'tools',
        'password' => 'root',
        // 'host' => '120.27.136.208',
        // 'port' => 3306,
        // 'database' => 'wpic',
        // 'username' => 'wpic',
        // 'password' => 'wpic#jsKk223',
        'charset' => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix' => '',
        'pool' => [
            'min_connections' => 1,
            'max_connections' => 10,
            'connect_timeout' => 10.0,
            'wait_timeout' => 3.0,
            'heartbeat' => -1,
            'max_idle_time' => (float)env('DB_MAX_IDLE_TIME', 60),
        ]
    ],
];
