/** * @return \yii\db\ActiveQuery */ public function getClass() { return $this->hasOne(HotelClass::className(), ['id' => 'class_id']); }