Task #146
Updated by Dana Basheer 9 days ago
This module is used to define room rates based on Hotel Category, Room Category, and Room Type. Each combination will have a specific rate configured per enterprise. Room type is static (Single, Double, Extra Bed, etc.)
**Table**
hotel_room_type_rate
* id INT PK AUTO_INCREMENT Unique room type rate ID
* enterprise_id INT FK → enterprise_master.id Enterprise reference
* hotel_category_id INT FK → hotel_category_master.id Hotel category
* room_category_id INT FK → room_category_master.id Room category
* room_type VARCHAR(50) Room type (Single, Double, Extra Bed)
* rate DECIMAL(10,2) Rate for this room type
* is_active BOOLEAN DEFAULT TRUE Active / Inactive status
* created_at DATETIME Record creation date
* updated_at DATETIME Last updated date
**Validations**
Mandatory
* enterprise_id is required
* hotel_category_id is required
* room_category_id is required
* room_type is required
* rate is required
Duplicate
Prevent duplicate combination:
Same
enterprise_id + hotel_category_id + room_category_id + room_type
Rate
* Must be numeric
* Must be greater than or equal to 0
* Cannot be empty
* Cannot be negative
Room Type
Must be selected from predefined static values
Cannot enter custom text
Allowed values:
* Single
* Double
* Extra Bed
* Child With Bed
* Child Without Bed
Enterprise
* enterprise_id must match logged-in enterprise session
* Cannot assign room rate to another enterprise
Edit
Allowed to edit:
* rate
* is_active
Not allowed to edit:
* enterprise_id
* hotel_category_id
* room_category_id
* room_type
Active / Inactive Rule
* is_active = TRUE → Rate available in tour plan
* is_active = FALSE → Rate hidden
Soft delete only (do not delete record)