You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

6 months ago
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('banners', function (Blueprint $table) {
$table->comment('banner');
$table->increments('id');
$table->integer('admin_id')->nullable();
$table->integer('department_id')->nullable();
$table->string('name')->nullable()->comment('名字');
$table->integer('image_id')->nullable()->comment('图片id');
$table->tinyInteger('jump_type')->nullable()->comment('跳转类型1小程序2H5');
$table->string('jump_url')->nullable()->comment('跳转地址');
$table->integer('sort')->nullable()->default(1)->comment('排序');
$table->tinyInteger('position')->nullable()->comment('显示位置1首页');
$table->dateTime('created_at')->nullable();
$table->dateTime('updated_at')->nullable();
$table->dateTime('deleted_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('banners');
}
};