public function getCreatorDetail() { if (!empty($this->origin) && $this->origin !== IssueUser::HELPDESK) { return $this->hasOne(IssueUser::className(), ['_id' => 'creator']); } return $this->hasOne(HelpDesk::className(), ['_id' => 'creator']); }
public function getAssigneeDetail() { return $this->hasOne(HelpDesk::className(), ['_id' => 'assignee']); }