Example #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRoom()
 {
     return $this->hasOne(Room::className(), ['id' => 'room_id']);
 }
Example #2
0
 public function getRooms()
 {
     return $this->hasMany(Room::className(), ['id' => 'room_id'])->via('reservations');
 }
Example #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getClssRm()
 {
     return $this->hasOne(Room::className(), ['rm_id' => 'clss_rm_id']);
 }
Example #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRooms()
 {
     return $this->hasMany(Room::className(), ['location_id' => 'id']);
 }