Phase 2: Kalender, Anfrage, Vorreservierung & Sonderangebote
- 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>
This commit is contained in:
1 parent
2e9a391b37
commit
08b6582fa1
79 files changed
+6213
-76
No files matched your search
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Enums\BookingStatus;
|
||||
use App\Models\Booking;
|
||||
use App\Models\Guest;
|
||||
use App\Models\Property;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends Factory<Booking>
|
||||
*/
|
||||
class BookingFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$arrival = now()->addDays(fake()->numberBetween(30, 200))->startOfDay();
|
||||
|
||||
return [
|
||||
'property_id' => Property::factory(),
|
||||
'guest_id' => Guest::factory(),
|
||||
'status' => BookingStatus::Confirmed,
|
||||
'arrival' => $arrival->toDateString(),
|
||||
'departure' => $arrival->copy()->addDays(7)->toDateString(),
|
||||
'guests' => 2,
|
||||
'quote' => [],
|
||||
'total' => 80000,
|
||||
'deposit' => 20000,
|
||||
'balance_due_on' => $arrival->copy()->subDays(28)->toDateString(),
|
||||
];
|
||||
}
|
||||
|
||||
public function reserved(?\DateTimeInterface $holdExpiresAt = null): static
|
||||
{
|
||||
return $this->state(fn (): array => [
|
||||
'status' => BookingStatus::Reserved,
|
||||
'hold_expires_at' => $holdExpiresAt ?? now()->addHours(48),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user