初始化
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('solutions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('slug')->unique();
|
||||
$table->string('power_segment')->nullable(); // 功率段:lt30|30-65|65-100|gt100
|
||||
$table->string('application')->nullable(); // 应用场景:charger|powerbank|car|dock
|
||||
$table->string('chip_platform')->nullable(); // 芯片平台:protocol|soc|rectifier
|
||||
$table->string('power')->nullable(); // 功率参数,如 65W
|
||||
$table->string('summary')->nullable();
|
||||
$table->text('advantages')->nullable(); // 方案优势,换行分隔
|
||||
$table->text('description')->nullable();
|
||||
$table->string('cover')->nullable();
|
||||
$table->string('status')->default('published'); // published | draft
|
||||
$table->integer('sort')->default(0);
|
||||
$table->string('seo_title')->nullable();
|
||||
$table->string('seo_description')->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('solutions');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user