<?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_exc_records', function (Blueprint $table) {
            $table->comment('订单异常记录');
            $table->increments('id');
            $table->unsignedBigInteger('order_id')->comment('订单编号');
            $table->unsignedBigInteger('customer_service_id')->nullable()->comment('跟单客服编号');
            $table->string('type')->default('')->comment('异常类型');
            $table->string('reason')->default('')->comment('异常原因');
            $table->string('remark')->nullable()->comment('备注');
            $table->string('state')->default('ENABLE')->comment('状态');
            $table->timestamps();
            $table->softDeletes();
        });
    }

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