Files
fewo-stommer/database/migrations/2026_10_22_091123_create_seasons_table.php
T
Lars StommerandClaude Opus 5.5 2e9a391b37 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>
2026-10-22 09:19:49 +02:00

36 lines
901 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('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');
}
};