ParticipantStatus::class, 'responded_at' => 'datetime', ]; } public function event(): BelongsTo { return $this->belongsTo(Event::class); } public function player(): BelongsTo { return $this->belongsTo(Player::class)->withTrashed(); } public function user(): BelongsTo { return $this->belongsTo(User::class)->withTrashed(); } public function setByUser(): BelongsTo { return $this->belongsTo(User::class, 'set_by_user_id')->withTrashed(); } public function participantName(): string { if ($this->user_id) { return $this->user?->name ?? __('ui.unknown'); } return $this->player?->full_name ?? __('ui.unknown'); } }