<?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('shopee_seller_scraped_images', function (Blueprint $table) {
            $table->id();
            $table->foreignId('shopee_seller_scrape_id');
            $table->string('original_name');
            $table->string('image')->nullable();
            $table->boolean('featured')->default(false);
            $table->timestamps();

            $table->foreign('shopee_seller_scrape_id')->references('id')->on('shopee_seller_scrapes');
        });
    }

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