<?php

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

class CreateProcessesAdditionalBillsTable extends Migration
{
    /**
     * Run the migrations.
     *
     *二次加工单叠加单
     *
     * @return void
     */
    public function up()
    {
        Schema::create('processes_additional_bills', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('process_id')->index()->comment('外键二次加工单');
            $table->string('wms_code')->index()->comment('单据号');
            $table->enum('bill_type',['入库单'])->default('入库单')->comment('单据类型');
            $table->integer('amount')->comment('数量');
            $table->timestamps();
        });
    }

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