public function getLastReservation() { return $this->hasOne(Reservation::className(), ['room_id' => 'id'])->orderBy(['id' => SORT_DESC]); }
public function getReservationsCount() { return $this->hasMany(Reservation::className(), ['customer_id' => 'id'])->count(); }