<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order_grab_records', function (Blueprint $table) {
            $table->comment('订单抢单记录');
            $table->increments('id');
            $table->unsignedBigInteger('coach_id')->comment('技师编号');
            $table->unsignedBigInteger('order_id')->comment('订单编号');
            $table->string('state')->default('JOINED')->comment('状态');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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