- Datenmodell Property/Season/Extra (Beträge in Cent), Seeder mit Preisliste 2026 - PriceCalculator: Saison-Splitting, Mindestaufenthalt, Zusatzperson, Endreinigung, Extras, Anzahlung/Restzahlung - Filament-Verwaltung: Wohnungen, Saisons (Überschneidungsprüfung, Lückenwarnung, Kopie ins Folgejahr, Preisrechner), Zusatzleistungen - Tests für Preisberechnung und Saisonverwaltung Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
910 B
PHP
35 lines
910 B
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('extras', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('property_id')->constrained()->cascadeOnDelete();
|
|
$table->string('name');
|
|
$table->string('description')->nullable();
|
|
$table->unsignedInteger('price');
|
|
$table->string('pricing');
|
|
$table->boolean('is_active')->default(true);
|
|
$table->unsignedSmallInteger('sort_order')->default(0);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('extras');
|
|
}
|
|
};
|