<?php

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

class CreatePaperBoxesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('paper_boxes', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('model')->unique()->comment('模型');
            $table->decimal('length')->index()->comment('长(cm)');
            $table->decimal('width')->index()->comment('宽(cm)');
            $table->decimal('height')->index()->comment('高(cm)');
            $table->timestamps();
        });
    }

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