'datetime', 'left_at' => 'datetime', 'hand_raised' => 'boolean', 'speak_requested' => 'boolean', 'speak_granted' => 'boolean', 'is_muted' => 'boolean', 'is_video_off' => 'boolean', ]; } protected static function booted(): void { static::creating(function (Participant $participant) { if (empty($participant->uuid)) { $participant->uuid = (string) Str::uuid(); } }); } public function getRouteKeyName(): string { return 'uuid'; } public function session(): BelongsTo { return $this->belongsTo(Session::class, 'session_id'); } public function isHost(): bool { return in_array($this->role, ['host', 'co_host'], true); } public function isPanelist(): bool { return $this->role === 'panelist'; } public function isAttendee(): bool { return $this->role === 'attendee'; } public function canPublishMedia(): bool { if ($this->speak_granted) { return true; } return $this->role !== 'attendee'; } public function hasSpeakAccess(): bool { return $this->speak_granted; } public function breakoutRoom(): BelongsTo { return $this->belongsTo(BreakoutRoom::class, 'breakout_room_id'); } public function isJoined(): bool { return $this->status === 'joined'; } }