<?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('meme_medias', function (Blueprint $table) {
            $table->id();
            $table->boolean('is_enabled')->default(false);
            $table->string('original_id');
            $table->enum('type', ['video', 'image']);
            $table->enum('sub_type', ['background', 'overlay']);
            $table->string('name');
            $table->text('description');
            $table->json('keywords');
            $table->uuid('mov_uuid');
            $table->uuid('webm_uuid');
            $table->uuid('gif_uuid');
            $table->uuid('webp_uuid');
            $table->string('mov_url');
            $table->string('webm_url');
            $table->string('gif_url');
            $table->string('webp_url');
            $table->double('duration')->nullable();
            $table->integer('media_width')->default(720);
            $table->integer('media_height')->default(1280);
            $table->timestamps();
            $table->softDeletes();
        });
    }

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