2025-11-05 16:34:40 +08:00
|
|
|
<?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' => [
|
2025-11-10 10:45:43 +08:00
|
|
|
'driver' => env('DB_DRIVER', 'pgsql'),
|
|
|
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
|
|
|
|
'database' => env('DB_DATABASE', 'dataflow'),
|
|
|
|
|
'port' => env('DB_PORT', 5416),
|
|
|
|
|
'username' => env('DB_USERNAME', 'dataflow'),
|
|
|
|
|
'password' => env('DB_PASSWORD', 'dataflow'),
|
2025-11-05 16:34:40 +08:00
|
|
|
'charset' => env('DB_CHARSET', 'utf8'),
|
|
|
|
|
'collation' => env('DB_COLLATION', 'utf8_unicode_ci'),
|
|
|
|
|
'prefix' => env('DB_PREFIX', ''),
|
2025-11-10 10:45:43 +08:00
|
|
|
'schema' => env('DB_SCHEMA', 'public'),
|
|
|
|
|
'sslmode' => env('DB_SSL_MODE', 'prefer'),
|
2025-11-05 16:34:40 +08:00
|
|
|
'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',
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
];
|