/** * @return \yii\db\ActiveQuery */ public function getResource() { return Resource::get($this->resource_id); }