<?php

use App\Database\Blueprint;
use App\Enums\OrderStatusEnum;
use Illuminate\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('orders', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('supplier_id');
            $table->uuid('feedBackId')->nullable();
            $table->enum('orderStatus', OrderStatusEnum::getValues())->default(OrderStatusEnum::supplierSelect);
            $table->timestamps();
            $table->softDeletes();
            $table->userIdFields();
        });
    }

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