E3: Rechtstext-Versionierung in der DB (legal_documents)
Jede veroeffentlichte Fassung eines Rechtstexts ist eine Zeile mit type/version/effective_from — alte Fassungen sind unloeschbar, zukuenftige werden erst ab Stichtag wirksam (LegalDocument::current). Seeder legt die fuenf aktuellen Fassungen an (AGB 0.6, Datenschutz 0.3, Richtlinien 0.1, Meldeverfahren 0.1, Impressum 0.1). Die Unternehmer-Bestaetigung (T1neu) referenziert jetzt die konkrete Fassung (legal_document_id am Buchungsdatensatz, restrictOnDelete); AGB-Seite und Buchungs-Modal ziehen Version/Stand aus der DB. config/legal.php bleibt reiner Fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7624064ea0
commit
196f83a377
12 changed files with 294 additions and 11 deletions
|
|
@ -25,6 +25,7 @@ class BookingConfirmation extends Model
|
|||
'booking_type',
|
||||
'booking_ref',
|
||||
'interval',
|
||||
'legal_document_id',
|
||||
'agb_version',
|
||||
'ip',
|
||||
'confirmed_at',
|
||||
|
|
@ -42,6 +43,15 @@ class BookingConfirmation extends Model
|
|||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Die akzeptierte AGB-Fassung (E3: "agb_version_id" am
|
||||
* Buchungsdatensatz); `agb_version` hält den Klartext redundant fest.
|
||||
*/
|
||||
public function legalDocument(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(LegalDocument::class);
|
||||
}
|
||||
|
||||
public function scopeRecentFor(Builder $query, User $user): Builder
|
||||
{
|
||||
return $query
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue