Sistema de archivos multimedia: MediaManager, checkbox imágenes en mapa, modal visor, subida por feature/proyecto

This commit is contained in:
2026-05-09 22:28:20 +02:00
parent dabd35091a
commit 8f7b9aa09b
12 changed files with 586 additions and 1 deletions
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up()
{
Schema::create('media', function (Blueprint $table) {
$table->id();
$table->morphs('mediable'); // project, phase, layer, feature
$table->string('name');
$table->string('file_path');
$table->string('file_type'); // image/jpeg, application/pdf, etc.
$table->string('file_extension', 10);
$table->unsignedInteger('file_size');
$table->enum('category', ['image', 'document', 'other'])->default('image');
$table->text('description')->nullable();
$table->json('metadata')->nullable(); // EXIF, GPS coords, etc.
$table->foreignId('uploaded_by')->constrained('users');
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('media');
}
};