The Room Management system handles the configuration and organization of hotel accommodations within the Hotelaro platform. This subsystem manages individual room definitions, room types, floor organization, and amenities assignment. It provides comprehensive room setup capabilities including pricing, capacity, visibility controls, and physical attributes.
For calendar-based room availability and booking operations, see Calendar Interface. For reservation processing workflows, see Reservation Processing.
The Room Management system is built around three core modules that work together to provide complete accommodation management functionality.
Core Components Architecture
Database Tables
Supporting Modules
Floor Management Module
Room Types Module
Room Configuration Module
Setup\Rooms\Controllers\Rooms
Setup\Rooms\Models\RoomsModel
Setup\Rooms\Views\*
Setup\Roomtypes\Controllers\Roomtypes
Setup\Roomtypes\Models\RoomtypesModel
Setup\Roomtypes\Views\*
Setup\Floor\Controllers\Floor
Setup\Floor\Models\FloorModel
Setup\Floor\Views\*
Setup\Amenities\Controllers\Amenities
Setup\Amenities\Models\AmenitiesModel
hotel_booking_rooms
hotel_booking_room_type
hotel_booking_floors
hotel_booking_amenitis
User Request
AuthCheck Filter
admin_uid Extraction
Room Operations
Room Type Operations
Floor Operations
hotel_booking_rooms WHERE admin_uid
hotel_booking_room_type WHERE admin_uid
hotel_booking_floors WHERE admin_uid
Tenant-Specific Room Data
JSON/HTML Response
All room management operations are filtered by admin_uid to ensure multi-tenant isolation. The system automatically applies tenant filtering at the model level for all CRUD operations.
The room configuration system provides comprehensive setup for individual accommodation units through a multi-section form interface.
Section 4: Additional Features
Section 3: Visibility Controls
Section 2: Physical Properties
Section 1: Description
Room Configuration Form
Room Type Selection
Room Code Assignment
Floor Assignment
Name & Description
Adults/Children Capacity
Room View Selection
Default Pricing
Booking Engine Visibility
Website Visibility
Bedding Configuration
Amenities Assignment
Photo Upload
Services & Extras
Form Validation
hotel_booking_rooms INSERT/UPDATE
The room configuration form is structured in logical sections that guide users through the complete setup process.
The system provides eight predefined view types that guests can see from their accommodation:
| View ID | View Type | Icon | Description |
|---|---|---|---|
| 1 | Sea | Wave SVG | Ocean or sea view |
| 2 | City | Building SVG | Urban landscape view |
| 3 | Garden | Tree SVG | Garden or landscaped view |
| 4 | Lake | Lake SVG | Lake or water feature view |
| 5 | Monument | Monument SVG | Historical or landmark view |
| 6 | Mountain | Mountain SVG | Mountain or hill view |
| 7 | Pool | Pool SVG | Swimming pool view |
| 8 | River | River SVG | River or stream view |
The view selection is implemented as an interactive grid with SVG icons and stored as a numeric value in the viewroom field.
Form POST Data
Input Validation
Amenity Array Processing
JSON Encoding
admin_uid Assignment
Photo Path Handling
Database Operation
INSERT for New Room
UPDATE for Edit Room
Success Response
The datasetup() method in Rooms controller handles form processing with amenities converted to JSON format and tenant isolation applied automatically.
Room types define templates for accommodation categories with standardized naming and room number generation.
Room Generation
Basic Information
Room Type Configuration
room_type_name
room_type_code
room_size
unit (m2/ft2)
number_of_rooms
Generated Room Numbers
rooms_counts JSON
hotel_booking_room_type
Room types automatically generate room number arrays based on the room type code and quantity specified.
The JavaScript logic for room number generation follows this pattern:
Each room number combines the room type code with a sequential number (e.g., "DLX 1", "DLX 2").
The floor management system provides drag-and-drop organization of hotel floors with room count tracking.
Interactive Features
Floor Card Components
Floor List Display
Floor Name
Room Count Badge
Serviceable Status Toggle
Drag Handle
Edit Button
Delete Button
jQuery Sortable
AJAX Order Update
Status Toggle AJAX
Add/Edit Popup
Floor cards display room counts dynamically calculated by counting rooms assigned to each floor.
User Drags Floor Card
jQuery Sortable Update Event
Extract New Order Array
POST to floor/update_order
Loop Through order Array
UPDATE hotel_booking_floors SET sort_order
Success Response
The drag-and-drop reordering updates the sort_order field for each floor, maintaining the user-defined arrangement.
SELECT * FROM hotel_booking_floors
SELECT * FROM hotel_booking_rooms
Floor Data Array
Room Data Array
For Each Floor
Match room.floor == floor.id
floor.room_count++
Display with Room Count
Room counts are calculated dynamically by matching room floor field values with floor id values.
The amenities system manages hotel facility features that can be assigned to rooms.
Amenity Data Structure
Room Assignment
Room Configuration Form
Multi-Select Amenities
JSON Storage in room.amenities
Amenity Management Interface
Amenity ID
Amenity Name
Description
Icon/Image
Category
Amenities are stored in the hotel_booking_amenitis table and referenced in room records as JSON arrays.
| Table | Purpose | Key Fields |
|---|---|---|
| hotel_booking_rooms | Individual room definitions | id, admin_uid, name, type, floor, pricing, amenities |
| hotel_booking_room_type | Room type templates | id, admin_uid, room_type_name, room_type_code, rooms_counts |
| hotel_booking_floors | Floor organization | id, admin_uid, name, sort_order, status |
| hotel_booking_amenitis | Available amenities | id, admin_uid, name, description |
hotel_booking_rooms
int
id
PK
string
admin_uid
FK
string
name
int
type
FK
int
floor
FK
decimal
pricing
text
amenities
int
view_website
int
view_bookingengine
hotel_booking_room_type
int
id
PK
string
admin_uid
FK
string
room_type_name
string
room_type_code
int
number_of_rooms
text
rooms_counts
hotel_booking_floors
int
id
PK
string
admin_uid
FK
string
name
int
sort_order
int
status
hotel_booking_amenitis
int
id
PK
string
admin_uid
FK
string
name
text
description
All tables include admin_uid for multi-tenant isolation. Room amenities are stored as JSON arrays containing amenity IDs and names.