*/ public function helpdeskTickets(): HasMany { return $this->hasMany(Ticket::class, 'user_id'); } /** @return HasMany */ public function helpdeskAssignedTickets(): HasMany { return $this->hasMany(Ticket::class, 'agent_id'); } /** @return bool */ public function isHelpdeskAgent(): bool { return (bool) (($this->helpdesk_agent ?? false) || ($this->helpdesk_admin ?? false)); } /** @return bool */ public function isHelpdeskAdmin(): bool { return (bool) ($this->helpdesk_admin ?? false); } }