Files
sam-api/app/Services/TenantBootstrap/Steps/SettingsStep.php
hskwon cc206fdbed style: Laravel Pint 코드 포맷팅 적용
- PSR-12 스타일 가이드 준수
- 302개 파일 스타일 이슈 자동 수정
- 코드 로직 변경 없음 (포맷팅만)
2025-11-06 17:45:49 +09:00

34 lines
865 B
PHP

<?php
namespace App\Services\TenantBootstrap\Steps;
use App\Services\TenantBootstrap\Contracts\TenantBootstrapStep;
use Illuminate\Support\Facades\DB;
class SettingsStep implements TenantBootstrapStep
{
public function key(): string
{
return 'settings_seed';
}
public function run(int $tenantId): void
{
if (! DB::getSchemaBuilder()->hasTable('settings')) {
return;
}
$pairs = [
['general.company_name', '회사명 미설정'],
['ui.theme', 'light'],
['inventory.auto_reserve', '0'],
];
foreach ($pairs as [$key,$val]) {
DB::table('settings')->updateOrInsert(
['tenant_id' => $tenantId, 'key' => $key],
['value' => $val, 'updated_at' => now(), 'created_at' => now()]
);
}
}
}