<?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('background_medias', function (Blueprint $table) {
            $table->id();
            $table->text('prompt')->nullable();
            $table->enum('status', ['pending_media', 'completed'])->default('pending_media');
            $table->uuid('media_uuid')->nullable();
            $table->string('media_url')->nullable();
            $table->vector('embedding', 384)->nullable();
            $table->integer('media_width');
            $table->integer('media_height');
            $table->enum('aspect_ratio', ['9:16', '16:9', '1:1']);
            $table->timestamps();
            $table->softDeletes();
        });
    }

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