/** * @return \yii\db\ActiveQuery */ public function getRoom() { return $this->hasOne(Rooms::className(), ['id' => 'rooms_id']); }
/** * @return \yii\db\ActiveQuery */ public function getRooms() { return $this->hasMany(Rooms::className(), ['room_type_id' => 'id']); }