LMIV-SNACKAUTOMAT/database/migrations/2025_10_06_155755_create_tenants_table.php

35 lines
1.0 KiB
PHP

<?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('tenants', function (Blueprint $table) {
$table->id();
$table->string('name'); // Name des Mandanten (z.B. "Unternehmen A")
$table->string('slug')->unique(); // URL-freundlicher Identifier
$table->string('domain')->nullable(); // Optional: eigene Domain
$table->text('description')->nullable();
$table->string('logo')->nullable(); // Logo-Pfad
$table->json('settings')->nullable(); // Mandanten-spezifische Einstellungen
$table->boolean('is_active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tenants');
}
};