feat: 更新 .env.example 文件,新增彩票业务配置与 Redis、邮件、队列等环境变量,优化开发环境设置
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* 【任务 3 · 配置中心】键值运行时配置。
|
||||
*
|
||||
* 与 `config/*.php` / `.env` 分工:
|
||||
* - 密钥、站点 URL 等仍以 env 为准,不进库或不在此表明文扩写密钥;
|
||||
* - 可随时由运营调整的开关、限额类配置放本表,读时走 LotterySettings 带缓存。
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('lottery_settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('setting_key', 160)->unique();
|
||||
$table->json('value_json');
|
||||
$table->string('group_name', 64)->default('general')->comment('控制台分组展示用');
|
||||
$table->string('description_zh')->nullable()->comment('运维说明');
|
||||
$table->timestamps();
|
||||
|
||||
$table->index('group_name', 'idx_lottery_settings_group');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('lottery_settings');
|
||||
}
|
||||
};
|
||||
@@ -15,6 +15,7 @@ class DatabaseSeeder extends Seeder
|
||||
$this->call([
|
||||
CurrencySeeder::class,
|
||||
PlayTypeSeeder::class,
|
||||
LotterySettingsSeeder::class,
|
||||
]);
|
||||
|
||||
// 演示管理员 + 演示玩家:**勿在生产库执行**(或确保 APP_ENV≠production)
|
||||
|
||||
36
database/seeders/LotterySettingsSeeder.php
Normal file
36
database/seeders/LotterySettingsSeeder.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Services\LotterySettings;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
/**
|
||||
* 【配置中心】示例键;后续由运营后台维护同表即可。
|
||||
*/
|
||||
class LotterySettingsSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
LotterySettings::put(
|
||||
'wallet.transfer_in_enabled',
|
||||
true,
|
||||
'wallet',
|
||||
'是否允许玩家端发起转入(主站对接前可关)',
|
||||
);
|
||||
|
||||
LotterySettings::put(
|
||||
'wallet.transfer_out_enabled',
|
||||
true,
|
||||
'wallet',
|
||||
'是否允许玩家端发起转出',
|
||||
);
|
||||
|
||||
LotterySettings::put(
|
||||
'app.display_name_for_client',
|
||||
'Lottery',
|
||||
'general',
|
||||
'客户端展示用短名称(示例)',
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user