36 lines
1.2 KiB
PHP
36 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('ads', function (Blueprint $table) {
|
||
$table->id();
|
||
$table->string('address')->comment('位置');
|
||
$table->string('resource')->comment('资源');
|
||
$table->string('remark')->nullable()->comment('备注');
|
||
$table->timestamp('published_at')->nullable()->comment('发布时间');
|
||
$table->unsignedTinyInteger('is_enable')->default(1)->comment('显示开关');
|
||
$table->unsignedInteger('sort')->default(0)->comment('排序');
|
||
$table->unsignedTinyInteger('jump_type')->default(0)->comment('跳转,0:不跳转。1:网页跳转;2应用跳转;3微信小程序跳转');
|
||
$table->text('jump_config')->nullable()->comment('跳转配置');
|
||
$table->timestamps();
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Reverse the migrations.
|
||
*/
|
||
public function down(): void
|
||
{
|
||
Schema::dropIfExists('ads');
|
||
}
|
||
};
|