feat: implement tenant management system with attachment support and bootstrap controller

This commit is contained in:
2026-06-26 13:17:48 -03:00
parent 1f9d876bc3
commit 54aa696145
9 changed files with 198 additions and 52 deletions

View File

@@ -20,8 +20,8 @@ return new class extends Migration
$table->string('secondary_color')->nullable();
$table->string('danger_color')->nullable();
$table->string('header_footer_bg_color')->nullable();
$table->string('header_logo')->nullable();
$table->string('footer_logo')->nullable();
$table->unsignedBigInteger('header_logo_id')->nullable();
$table->unsignedBigInteger('footer_logo_id')->nullable();
$table->timestamps();
});
}

View File

@@ -28,6 +28,18 @@ return new class extends Migration
$table->index('type');
$table->index('mime_type');
});
Schema::table('tenants', function (Blueprint $table) {
$table->foreign('header_logo_id')
->references('id')
->on('attachments')
->nullOnDelete();
$table->foreign('footer_logo_id')
->references('id')
->on('attachments')
->nullOnDelete();
});
}
/**
@@ -35,6 +47,11 @@ return new class extends Migration
*/
public function down(): void
{
Schema::table('tenants', function (Blueprint $table) {
$table->dropForeign(['header_logo_id']);
$table->dropForeign(['footer_logo_id']);
});
Schema::dropIfExists('attachments');
}
};