<?php

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

class CreateSortingStationsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sorting_stations', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->index();
            $table->enum('type',['人工墙'])->default('人工墙');
            $table->integer('bin_amount')->default(0);
            $table->enum('is_online',['是','否','未知'])->default('否');
            $table->enum('is_occupied',['是','否','未知'])->default('否');
            $table->integer('processing_batch_id')->nullable();
            $table->timestamp('login_at')->nullable();
            $table->timestamps();
        });
    }

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