geschenkgutscheine implementiert ("Paket verschenken"). Neuer Upload-Provider: Sparkbooth.

This commit is contained in:
Codex Agent
2025-12-07 16:54:58 +01:00
parent 3f3c0f1d35
commit 046e2fe3ec
50 changed files with 2422 additions and 130 deletions

View File

@@ -25,12 +25,16 @@ class Event extends Model
'name' => 'array',
'description' => 'array',
'photobooth_enabled' => 'boolean',
'photobooth_mode' => 'string',
'photobooth_expires_at' => 'datetime',
'photobooth_metadata' => 'array',
'sparkbooth_expires_at' => 'datetime',
'sparkbooth_last_upload_at' => 'datetime',
];
protected $hidden = [
'photobooth_password_encrypted',
'sparkbooth_password_encrypted',
];
protected static function booted(): void
@@ -196,4 +200,26 @@ class Event extends Model
? Crypt::encryptString($value)
: null;
}
public function getSparkboothPasswordAttribute(): ?string
{
$encrypted = $this->attributes['sparkbooth_password_encrypted'] ?? null;
if (! $encrypted) {
return null;
}
try {
return Crypt::decryptString($encrypted);
} catch (DecryptException) {
return null;
}
}
public function setSparkboothPasswordAttribute(?string $value): void
{
$this->attributes['sparkbooth_password_encrypted'] = $value
? Crypt::encryptString($value)
: null;
}
}