2022_01_25_140917_create_video_temp_table.php 1.74 KB
<?php

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

class CreateVideoTempTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('video_temp', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->default('')->comment('模板标题');
            $table->unsignedTinyInteger('type')->index()->comment('1=audio,2=video');
            $table->unsignedTinyInteger('bg_type')->comment('1=image,2=video');
            $table->string('bg_url')->nullable()->comment('背景动画化地址');
            $table->unsignedTinyInteger('bg_music')->comment('0=没有,1=有');
            $table->string('bgm_url')->nullable()->comment('背景音乐地址');

            $table->string('text_color')->nullable()->comment('文字颜色');
            $table->string('text_bg_color')->nullable()->comment('文字背景色');
            $table->double('opacity')->nullable()->comment('透明度');

            $table->unsignedTinyInteger('sn')->default('99')->comment('序号');
            $table->unsignedSmallInteger('top')->default('0')->comment('距离容器上边距');
            $table->unsignedSmallInteger('left')->default('0')->comment('距离容器左边距');
            $table->unsignedTinyInteger('font_size')->default('12')->comment('字号');
            $table->unsignedTinyInteger('state')->nullable()->comment('0=不显示,1=显示');
            $table->timestamps();
        });
    }

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