Deploy Ladill Meet / deploy (push) Failing after 7s
Phases 0–18: core meetings, webinar, breakouts, team chat, live streaming, town hall, billing, and Ladill Mail calendar wiring. Co-authored-by: Cursor <cursoragent@cursor.com>
53 lines
1.2 KiB
PHP
53 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Concerns\BelongsToOwner;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Support\Str;
|
|
|
|
class WebinarRegistration extends Model
|
|
{
|
|
use BelongsToOwner;
|
|
|
|
protected $table = 'meet_webinar_registrations';
|
|
|
|
protected $fillable = [
|
|
'uuid', 'owner_ref', 'room_id', 'email', 'display_name', 'status',
|
|
'access_token', 'approved_at', 'metadata',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['approved_at' => 'datetime', 'metadata' => 'array'];
|
|
}
|
|
|
|
protected static function booted(): void
|
|
{
|
|
static::creating(function (WebinarRegistration $reg) {
|
|
if (empty($reg->uuid)) {
|
|
$reg->uuid = (string) Str::uuid();
|
|
}
|
|
if (empty($reg->access_token)) {
|
|
$reg->access_token = Str::random(48);
|
|
}
|
|
});
|
|
}
|
|
|
|
public function getRouteKeyName(): string
|
|
{
|
|
return 'uuid';
|
|
}
|
|
|
|
public function room(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Room::class, 'room_id');
|
|
}
|
|
|
|
public function isApproved(): bool
|
|
{
|
|
return $this->status === 'approved';
|
|
}
|
|
}
|