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,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Database\Factories\GuestFactory;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
#[Fillable(['first_name', 'last_name', 'email', 'phone', 'street', 'postal_code', 'city', 'country', 'locale', 'notes'])]
|
||||
class Guest extends Model
|
||||
{
|
||||
/** @use HasFactory<GuestFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* @return HasMany<Booking, $this>
|
||||
*/
|
||||
public function bookings(): HasMany
|
||||
{
|
||||
return $this->hasMany(Booking::class)->latest('arrival');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Attribute<string, never>
|
||||
*/
|
||||
protected function fullName(): Attribute
|
||||
{
|
||||
return Attribute::get(fn (): string => "{$this->first_name} {$this->last_name}");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user