Project

General

Profile

Actions

Task #160

open

Hotel Master

Added by Dana Basheer about 16 hours ago. Updated about 10 hours ago.

Status:
Resolved
Priority:
High
Assignee:
Start date:
03/05/2026
Due date:
03/05/2026 (Due in 0 days)
% Done:

0%

Estimated time:

Description

This module is used to manage hotel details in the system. Each hotel belongs to a specific location and can optionally be associated with nearby sightseeing places. The module stores information such as hotel name, location, description, and image. These hotels will be used in other modules such as tour planning, hotel selection, and public APIs.

Table

hotel_master

  • hotel_id (PK) INT AUTO_INCREMENT Unique hotel ID
  • loc_id (FK) INT References loc_master.loc_id
  • sight_seeing_id (FK) INT References sightseeing_master.id
  • hotel_name VARCHAR(150) Name of the hotel
  • description TEXT Hotel description
  • image_url VARCHAR(255) Hotel image URL
  • is_active BOOLEAN DEFAULT TRUE Active / inactive status
  • created_at DATETIME Record created date
  • updated_at DATETIME Record updated date

Validations

Mandatory

  • loc_id required
  • hotel_name required

Hotel Name

  • Minimum 2 characters
  • Maximum 150 characters
  • Cannot be empty

Duplicate

  • Prevent duplicate hotel name within the same location.

Location

  • loc_id must exist in loc_master
  • location must be active

Sightseeing

  • sight_seeing_id must exist in sightseeing_master
  • sightseeing should belong to the same location

Image

  • Allowed formats: jpg, jpeg, png, webp
  • Maximum file size: 5 MB
  • Stored as image_url

Edit

Allow edit:

  • hotel_name
  • description
  • image_url
  • is_active

Do NOT allow edit:

  • loc_id

Delete

  • Soft delete only.

Set:

  • is_active = FALSE
  • Do not physically delete the record.
Actions

Also available in: Atom PDF