id(); $table->string('name'); // Например: "Intel Core i5-12400F" $table->foreignId('component_type_id')->constrained()->onDelete('cascade'); $table->decimal('price', 10, 2); $table->json('specifications')->nullable(); // Для хранения характеристик $table->boolean('is_official')->default(true); // true = админ, false = пользователь $table->foreignId('created_by_user_id')->nullable()->constrained('users')->onDelete('set null'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('components'); } };