<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('delhivery_pickups', function (Blueprint $table) {
            $table->id();
            $table->string('pickup_id', 191)->nullable();
            $table->string('pickup_location');
            $table->integer('expected_package_count');
            $table->date('pickup_date');
            $table->time('pickup_time');
            $table->text('api_pickup_response')->nullable();
            $table->timestamps();

            $table->index('pickup_id');
            $table->index('pickup_date');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('delhivery_pickups');
    }
};
