1
0
Fork 0
party-rank-server/database/migrations/2023_12_01_200448_create_ba...

37 lines
1.2 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('banners', function (Blueprint $table) {
$table->id();
$table->string('title')->nullable()->comment('标题');
$table->string('picture')->nullable()->comment('图片');
$table->text('description')->nullable()->comment('描述');
$table->unsignedBigInteger('place_id')->comment('位置, keywords.id');
$table->string('path')->default('-')->comment('位置, 所有上级, -1-2-3-');
$table->timestamp('published_at')->nullable()->comment('发布时间');
$table->unsignedTinyInteger('is_enable')->default(1)->comment('是否显示');
$table->unsignedInteger('sort')->default(0)->comment('排序(倒序)');
$table->json('link_config')->nullable()->comment('跳转配置');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('banners');
}
};