Port the Fuc 0.12.0 frontend and default-off VIP plugin. Include the previously approved password-reset token revocation. Deploy only to an independent FUC-XB test instance; no production cutover.
14 lines
1.8 KiB
PHP
14 lines
1.8 KiB
PHP
<?php
|
|
$app=require __DIR__.'/integration-bootstrap.php';
|
|
use App\Models\{User,Plan,Notice,Knowledge};
|
|
use Illuminate\Support\Facades\DB;
|
|
if(User::count())throw new RuntimeException('Instance is already seeded');
|
|
admin_setting(['app_name'=>'Fuc 验收站','app_url'=>'http://xb.loc','frontend_theme'=>'Fuc','secure_path'=>'fuc-qa-admin','captcha_enable'=>0,'email_verify'=>0,'telegram_bot_enable'=>0,'commission_withdraw_method'=>['支付宝','USDT'],'commission_withdraw_limit'=>1,'mail_flow'=>['enabled'=>false],'safe_mode_enable'=>0]);
|
|
$group=DB::table('v2_server_group')->insertGetId(['name'=>'验收组','created_at'=>time(),'updated_at'=>time()]);
|
|
$plan=Plan::create(['name'=>'本地验收月付','group_id'=>$group,'prices'=>['monthly'=>12,'yearly'=>120,'reset_traffic'=>5],'transfer_enable'=>100,'capacity_limit'=>null,'show'=>true,'sell'=>true,'renew'=>true,'content'=>'<p>真实 XB 接口验收套餐</p>']);
|
|
$free=Plan::create(['name'=>'本地零元开通验收','group_id'=>$group,'prices'=>['monthly'=>0],'transfer_enable'=>10,'capacity_limit'=>null,'show'=>true,'sell'=>true,'renew'=>true]);
|
|
$user=User::create(['email'=>'[email protected]','password'=>password_hash('Fuc-QA-Only-2026!',PASSWORD_DEFAULT),'uuid'=>(string)Illuminate\Support\Str::uuid(),'token'=>bin2hex(random_bytes(16)),'balance'=>0,'commission_balance'=>2000]);
|
|
Notice::create(['title'=>'Fuc 真实接口验收','content'=>'<p>本页面读取独立 SQLite 中的 XB 数据。</p>','show'=>1]);
|
|
Knowledge::create(['title'=>'配置指南','category'=>'使用说明','language'=>'zh-CN','body'=>"## 订阅导入\n\n使用个人订阅链接:{{subscribeUrl}}\n\n| 客户端 | 状态 |\n| --- | --- |\n| Clash | 支持 |",'show'=>1]);
|
|
echo "Seeded isolated account, two plans, notice and knowledge; no live data copied.\n";
|