diff --git a/CLAUDE.md b/CLAUDE.md index 2b6924c..402eac7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -509,6 +509,7 @@ ### 2. Multi-tenancy & Models - SoftDeletes by default - Common columns: tenant_id, created_by, updated_by, deleted_by (COMMENT required) - FK constraints: Created during design, minimal in production +- **πŸ”΄ 쿼리 μˆ˜μ • μ‹œ λͺ¨λΈ μŠ€μ½”ν”„ μš°μ„ **: `where('컬럼', 'κ°’')` ν•˜λ“œμ½”λ”© 전에 λ°˜λ“œμ‹œ λͺ¨λΈμ— μ •μ˜λœ μŠ€μ½”ν”„(scopeActive λ“±)λ₯Ό λ¨Όμ € ν™•μΈν•˜κ³ , μŠ€μ½”ν”„κ°€ 있으면 `Model::active()` ν˜•νƒœλ‘œ μ‚¬μš©ν•  것 ### 3. Middleware Stack - ApiKeyMiddleware, CheckSwaggerAuth, CorsMiddleware, CheckPermission, PermMapper diff --git a/app/Console/Commands/RecordStorageUsage.php b/app/Console/Commands/RecordStorageUsage.php index 5e94bec..c77f1eb 100644 --- a/app/Console/Commands/RecordStorageUsage.php +++ b/app/Console/Commands/RecordStorageUsage.php @@ -29,7 +29,7 @@ class RecordStorageUsage extends Command */ public function handle(): int { - $tenants = Tenant::where('tenant_st_code', 'active')->get(); + $tenants = Tenant::active()->get(); $recorded = 0; foreach ($tenants as $tenant) {