Phase 1: Wohnungen, Saisons & Preisberechnung

- 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>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 09:19:49 +02:00
1 parent bf4c1c0838
commit 2e9a391b37
35 files changed
+1766 -12

No files matched your search

@@ -0,0 +1,40 @@
<?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('properties', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('slug')->unique();
$table->string('address')->nullable();
$table->unsignedSmallInteger('size_sqm')->nullable();
$table->unsignedTinyInteger('max_guests');
$table->unsignedTinyInteger('included_guests');
$table->unsignedInteger('extra_guest_fee_per_night')->default(0);
$table->unsignedInteger('cleaning_fee')->default(0);
$table->unsignedTinyInteger('deposit_percent')->default(35);
$table->unsignedSmallInteger('balance_due_days_before_arrival')->default(28);
$table->time('check_in_time')->nullable();
$table->time('check_out_time')->nullable();
$table->boolean('is_active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('properties');
}
};
@@ -0,0 +1,35 @@
<?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('seasons', function (Blueprint $table) {
$table->id();
$table->foreignId('property_id')->constrained()->cascadeOnDelete();
$table->string('name');
$table->date('starts_on');
$table->date('ends_on');
$table->unsignedInteger('nightly_rate');
$table->unsignedTinyInteger('min_nights')->default(1);
$table->timestamps();
$table->index(['property_id', 'starts_on']);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('seasons');
}
};
@@ -0,0 +1,34 @@
<?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');
}
};