feat: [demo] 데모 테넌트 운영 자동화 (Phase 2)

- DemoLimitMiddleware: 쇼케이스 읽기전용, 만료 체크, 외부연동 차단
- DemoTenantService: 파트너/체험 테넌트 생성, 기간 연장, 정식 전환
- ResetDemoShowcaseCommand: 매일 자정 데이터 리셋 + 샘플 재시드
- ManufacturingPresetSeeder: 부서/거래처/품목/견적/수주 샘플 데이터
- 스케줄러 등록 (00:00 demo:reset-showcase --seed)
- 미들웨어 별칭 등록 (demo.limit)
This commit is contained in:
김보곤
2026-03-13 22:20:52 +09:00
parent 39844a3ba0
commit 1eb8d2cb01
6 changed files with 696 additions and 0 deletions

View File

@@ -156,3 +156,16 @@
->onFailure(function () {
\Illuminate\Support\Facades\Log::error('❌ stat:check-kpi-alerts 스케줄러 실행 실패', ['time' => now()]);
});
// ─── 데모 쇼케이스 리셋 ───
// 매일 자정 00:00에 쇼케이스 테넌트 데이터 리셋 + 샘플 재시드
Schedule::command('demo:reset-showcase --seed')
->dailyAt('00:00')
->appendOutputTo(storage_path('logs/scheduler.log'))
->onSuccess(function () {
\Illuminate\Support\Facades\Log::info('✅ demo:reset-showcase 스케줄러 실행 성공', ['time' => now()]);
})
->onFailure(function () {
\Illuminate\Support\Facades\Log::error('❌ demo:reset-showcase 스케줄러 실행 실패', ['time' => now()]);
});