deplay phase 1

This commit is contained in:
Kevin Adametz 2026-04-17 17:19:11 +02:00
parent e3dc1afd8e
commit 5a7478907e
68 changed files with 2831 additions and 818 deletions

View file

@ -19,7 +19,7 @@ use Illuminate\Database\Eloquent\Collection;
* @property int $id
* @property Carbon $booking_date
* @property int $customer_id
* @property int $inquiry_id
* @property int $lead_id
* @property bool $new_drafts
* @property int $sf_guard_user_id
* @property int $branch_id
@ -212,8 +212,7 @@ class Booking extends Model
protected $casts = [
'customer_id' => 'int',
'inquiry_id' => 'int',
'offer_id' => 'int',
'lead_id' => 'int',
'new_drafts' => 'bool',
'sf_guard_user_id' => 'int',
'branch_id' => 'int',
@ -257,8 +256,7 @@ class Booking extends Model
protected $fillable = [
'booking_date',
'customer_id',
'inquiry_id',
'offer_id',
'lead_id',
'new_drafts',
'sf_guard_user_id',
'branch_id',
@ -395,29 +393,9 @@ class Booking extends Model
return $this->belongsTo(Customer::class);
}
/**
* Lead/Inquiry der Buchung.
* FK-Spalte `inquiry_id` (vormals `lead_id` Modul 3 Phase 2 Rename).
* Methodenname bleibt `lead()` für Legacy-Kompatibilität; {@see self::inquiry()}
* ist der fachlich korrekte Alias und sollte in neuem Code verwendet werden.
*/
public function lead()
{
return $this->belongsTo(Lead::class, 'inquiry_id');
}
public function inquiry()
{
return $this->belongsTo(Lead::class, 'inquiry_id');
}
/**
* Angebot, aus dem diese Buchung entstanden ist (Modul 6, Ticket B8).
* Nullable nicht jede Buchung hat einen Angebots-Vorlauf.
*/
public function offer()
{
return $this->belongsTo(\App\Models\Offer::class);
return $this->belongsTo(Lead::class);
}
public function sf_guard_user()