/** * @return \yii\db\ActiveQuery */ public function getState() { return $this->hasOne(app\models\State::className(), ['id' => 'state_id']); }