123
This commit is contained in:
@@ -13,14 +13,16 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('components', function (Blueprint $table) {
|
||||
$table->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();
|
||||
$table->text('name');
|
||||
$table->text('type');
|
||||
$table->text('brand');
|
||||
$table->text('model');
|
||||
$table->integer('price');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
|
||||
Reference in New Issue
Block a user