$tenantId, 'code' => 'input_variables', 'name' => '입력변수', 'description' => '사용자가 직접 입력하는 기본 변수 (오픈사이즈, 제품카테고리, 가이드유형, 모터전원, 연동제어, 수량)', 'sort_order' => 1, 'is_active' => true, 'created_by' => 1, 'updated_by' => 1, ], [ 'tenant_id' => $tenantId, 'code' => 'calculation_variables', 'name' => '계산변수', 'description' => '입력변수를 기반으로 자동 계산되는 파생 변수 (제작사이즈, 면적, 중량)', 'sort_order' => 2, 'is_active' => true, 'created_by' => 1, 'updated_by' => 1, ], [ 'tenant_id' => $tenantId, 'code' => 'range_selection', 'name' => '범위선택', 'description' => '조건(중량, 높이, 폭)에 따라 자동 선택되는 품목 (모터, 가이드레일, 케이스)', 'sort_order' => 3, 'is_active' => true, 'created_by' => 1, 'updated_by' => 1, ], [ 'tenant_id' => $tenantId, 'code' => 'item_mapping', 'name' => '품목매핑', 'description' => '견적 계산에 포함되는 품목과 수량/단가 수식 정의', 'sort_order' => 4, 'is_active' => true, 'created_by' => 1, 'updated_by' => 1, ], ]; foreach ($categories as $category) { DB::table('quote_formula_categories')->updateOrInsert( ['tenant_id' => $category['tenant_id'], 'code' => $category['code']], array_merge($category, [ 'created_at' => now(), 'updated_at' => now(), ]) ); } $this->command->info('QuoteFormulaCategorySeeder: '.count($categories).'개 카테고리 생성 완료'); } }