<?php

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

class CreateWaybillAuditLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('waybill_audit_logs', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('waybill_id')->comment('外键运单');
//            $table->foreign('waybill_id')->references('id')->on('waybills');
            $table->string('audit_stage')->comment('审核阶段');
            $table->bigInteger('user_id')->comment('审核人');
//            $table->foreign('user_id')->references('id')->on('users');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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