<?php

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

class CreateBilibiliVideoPartsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bilibili_video_parts', function (Blueprint $table) {
            $table->increments('id');
            $table->bigInteger("aid")->comment("视频part 关联的视频 id");
            $table->string("part")->comment("part 名");
            $table->unsignedTinyInteger("page")->comment("顺序值");
            $table->unsignedInteger("duration")->comment("时长");
            $table->unsignedTinyInteger("is_downloaded")->comment("是否已下载")->default(0);
            $table->timestamps();
        });
    }

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