2022_01_04_093052_create_membership_table.php 1.27 KB
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMembershipTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('membership', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->default('')->comment('标题');
            $table->string('intro')->default('')->comment('简介');

            $table->unsignedTinyInteger('bg_type')->default(0)->comment('背景类型,1=单图,2=轮播图,3=视频');

            $table->string('bg_images')->default('')->comment('介绍图');
            $table->string('video_url')->default('')->comment('视频地址');
            $table->string('video_cover')->default('')->comment('视频封面');

            $table->unsignedTinyInteger('terminal')->default(0)->comment('终端,1=Android,2=IOS');
            $table->unsignedTinyInteger('state')->default(0)->comment('显示0=不显示,1=显示');

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('membership');
    }
}