- Gäste, Buchungen (Status-Workflow), Sperrzeiten, Sonderangebote - Vorreservierung mit Haltezeit je Wohnung; abgelaufene Holds geben den Kalender sofort frei, Cron setzt Status und benachrichtigt - Sonderangebote/Sonderkonditionen: %, € pro Aufenthalt, Sonderpreis/Nacht, Gratis-Nächte; Bedingungen u. a. Saison, Vorlauf, Wochentag, Nächte, Aktionscode; bestes Einzel- vs. kombinierte Angebote - Öffentliche Seite /buchen: Belegungskalender, Live-Preis, Anfrageformular (Honeypot, Rate-Limit) - E-Mails: Angebot an Gast, Benachrichtigung Vermieter, Bestätigung, Absage, Ablauf - Filament: Anfragen & Buchungen (bestätigen, ablehnen, verlängern, stornieren, Telefonbuchung), Gäste, Sperrzeiten, Sonderangebote - Deutsche Validierungstexte Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.6 KiB
PHP
49 lines
1.6 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('bookings', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('reference')->nullable()->unique();
|
|
$table->foreignId('property_id')->constrained()->restrictOnDelete();
|
|
$table->foreignId('guest_id')->constrained()->restrictOnDelete();
|
|
$table->string('status')->index();
|
|
$table->string('source')->default('website');
|
|
$table->date('arrival');
|
|
$table->date('departure');
|
|
$table->unsignedTinyInteger('guests');
|
|
$table->json('extras')->nullable();
|
|
$table->string('promo_code')->nullable();
|
|
$table->json('quote');
|
|
$table->unsignedInteger('total');
|
|
$table->unsignedInteger('deposit');
|
|
$table->date('balance_due_on');
|
|
$table->dateTime('hold_expires_at')->nullable();
|
|
$table->text('message')->nullable();
|
|
$table->text('internal_notes')->nullable();
|
|
$table->dateTime('confirmed_at')->nullable();
|
|
$table->dateTime('cancelled_at')->nullable();
|
|
$table->timestamps();
|
|
|
|
$table->index(['property_id', 'arrival', 'departure']);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('bookings');
|
|
}
|
|
};
|