id(); $table->foreignId('category_id')->constrained()->onDelete('cascade'); $table->foreignId('subcategory_id')->nullable()->constrained()->onDelete('cascade'); $table->decimal('weight_value', 5, 2); // Bobot untuk kategori atau subkategori $table->decimal('normalized_weight', 5, 2); // Bobot yang sudah dinormalisasi $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('weights'); } };