fulinqingjie/database/migrations/2023_12_18_162317_create_ad...

36 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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');
}
};