[REFACTOR] 統一訂單同步 API 錯誤回應與修正 Linter 警告

This commit is contained in:
2026-03-19 14:07:32 +08:00
parent e3ceedc579
commit 0b4aeacb55
15 changed files with 1173 additions and 108 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Modules\Core\Models\Tenant;
class LocalTenantSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// 建立預設租戶 demo
$tenant = Tenant::firstOrCreate(
['id' => 'demo'],
['tenancy_db_name' => 'tenant_demo']
);
// 建立域名對應 localhost
$tenant->domains()->firstOrCreate(
['domain' => 'localhost'],
['tenant_id' => 'demo']
);
$this->command->info('Local tenant "demo" with domain "localhost" created/restored.');
}
}