Drop files here

SQL upload ( 0 ) x -

Page-related settings Click on the bar to scroll to top of page
Press Ctrl+Enter to execute query Press Enter to execute query
ascending
descending
Order:
Debug SQL
Count
Execution order
Time taken
Order by:
Group queries
Ungroup queries
Collapse Expand Show trace Hide trace Count : Time taken :
Bookmarks
Refresh
Add
No bookmarks
Add bookmark
Options
Set default





Collapse Expand Requery Edit Explain Profiling Bookmark Query failed Database : Queried time :
Untitled *
v Show/Hide tables list View in fullscreen Add tables from other databases New page Open page Save page Save page as Delete pages Create table Create relationship Choose column to display Reload Help Angular links / Direct links Snap to grid v Small/Big All Toggle small/big Toggle relationship lines Export schema > Move Menu > Pin text
Number of tables: 0
v hotel_booking_db bookings
* id : int(11)
* invoice_no : varchar(20)
* invoice_date : datetime
* registration_no : varchar(20)
* room_id : int(11)
* customer_id : int(11)
* booking_type : enum('hotel','meeting')
* check_in_date : date
* check_out_date : date
* actual_checkout_date : date
* check_in_time : time
* check_out_time : time
* total_price : decimal(10,2)
* deposit : decimal(10,2)
* deposit_transfer : decimal(10,2)
* status : enum('pending','confirmed','checked_in','checked_out','cancelled')
* payment_status : enum('unpaid','paid')
* payment_method : enum('cash','transfer','card')
* paid_at : datetime
* paid_by : int(11)
* discount_type : enum('none','amount','percent')
* discount_value : decimal(10,2)
* discount_note : varchar(255)
* notes : text
* created_at : timestamp
* slip_image : varchar(255)
v hotel_booking_db customers
* id : int(11)
* fullname : varchar(150)
* phone : varchar(20)
* email : varchar(100)
* id_card : varchar(50)
* nationality : varchar(100)
* address : text
* occupation : varchar(100)
* arriving_from : varchar(100)
* departing_to : varchar(100)
* created_at : timestamp
v hotel_booking_db extra_services
* id : int(11)
* booking_id : int(11)
* service_name : varchar(100)
* price : decimal(10,2)
* quantity : int(11)
* created_at : timestamp
v hotel_booking_db frontdesk_sales
* id : int(11)
* user_id : int(11)
* product_id : int(11)
* product_name : varchar(255)
* price : decimal(10,2)
* qty : int(11)
* total : decimal(10,2)
* payment_method : varchar(50)
* created_at : timestamp
v hotel_booking_db pos_branches
* id : int(11)
* name : varchar(100)
* type : varchar(50)
* status : enum('active','inactive')
* printer_ip : varchar(50)
* printer_width : int(11)
* printer_ip_kitchen : varchar(50)
* printer_ip_bar : varchar(50)
v hotel_booking_db pos_categories
* id : int(11)
* name : varchar(100)
* color : varchar(50)
* status : enum('active','inactive')
* branch_ids : varchar(255)
* printer_type : enum('kitchen','bar','none')
v hotel_booking_db pos_members
* id : int(11)
* phone : varchar(20)
* fullname : varchar(100)
* points : int(11)
* tier : enum('standard','vip')
* created_at : timestamp
v hotel_booking_db pos_orders
* id : int(11)
* branch_id : int(11)
* table_id : int(11)
* user_id : int(11)
* room_id : int(11)
* customer_name : varchar(100)
* status : enum('open','paid','cancelled')
* payment_method : varchar(50)
* subtotal : decimal(10,2)
* discount : decimal(10,2)
* tax : decimal(10,2)
* total : decimal(10,2)
* created_at : timestamp
* updated_at : timestamp
* shift_id : int(11)
* member_id : int(11)
* promo_id : int(11)
* discount_amount : decimal(10,2)
* vat_amount : decimal(10,2)
* service_charge_amount : decimal(10,2)
* is_void : tinyint(1)
* void_reason : varchar(255)
* void_by : int(11)
* void_at : timestamp
* is_takeaway : tinyint(1)
* paid_at : timestamp
v hotel_booking_db pos_order_items
* id : int(11)
* order_id : int(11)
* product_id : int(11)
* product_name : varchar(255)
* price : decimal(10,2)
* qty : int(11)
* total : decimal(10,2)
* status : enum('pending','served','cancelled')
* created_at : timestamp
v hotel_booking_db pos_products
* id : int(11)
* category_id : int(11)
* name : varchar(255)
* price : decimal(10,2)
* cost_price : decimal(10,2)
* stock_qty : int(11)
* image : varchar(255)
* status : enum('active','inactive')
* is_track_stock : tinyint(1)
* type : enum('finished_good','service','recipe')
* show_restaurant : tinyint(1)
* show_pub : tinyint(1)
* show_minimart : tinyint(1)
v hotel_booking_db pos_product_branches
* product_id : int(11)
* branch_id : int(11)
* stock_qty : int(11)
v hotel_booking_db pos_promotions
* id : int(11)
* promo_code : varchar(50)
* name : varchar(100)
* discount_type : enum('percent','amount')
* discount_value : decimal(10,2)
* min_spend : decimal(10,2)
* start_date : date
* end_date : date
* status : enum('active','inactive')
* created_at : timestamp
v hotel_booking_db pos_raw_materials
* id : int(11)
* name : varchar(255)
* unit : varchar(50)
* stock_qty : decimal(10,2)
* cost_per_unit : decimal(10,2)
* status : enum('active','inactive')
v hotel_booking_db pos_recipes
* id : int(11)
* product_id : int(11)
* raw_material_id : int(11)
* qty_used : decimal(10,2)
v hotel_booking_db pos_roles
* id : int(11)
* name : varchar(100)
* permissions : longtext
* is_system : tinyint(1)
v hotel_booking_db pos_shifts
* id : int(11)
* branch_id : int(11)
* user_id : int(11)
* starting_cash : decimal(10,2)
* ending_cash : decimal(10,2)
* expected_cash : decimal(10,2)
* opened_at : timestamp
* closed_at : timestamp
* status : enum('open','closed')
v hotel_booking_db pos_stock_logs
* id : int(11)
* product_id : int(11)
* user_id : int(11)
* action : enum('add','deduct','set','sale','withdraw')
* qty : int(11)
* reason : varchar(255)
* created_at : timestamp
v hotel_booking_db pos_stock_requests
* id : int(11)
* branch_id : int(11)
* requested_by : int(11)
* approved_by : int(11)
* product_id : int(11)
* qty : int(11)
* note : text
* status : enum('pending','approved','rejected')
* requested_at : timestamp
* approved_at : timestamp
v hotel_booking_db pos_tables
* id : int(11)
* branch_id : int(11)
* table_name : varchar(50)
* status : enum('available','occupied','cleaning')
v hotel_booking_db pos_users
* id : int(11)
* username : varchar(50)
* password : varchar(255)
* role_id : int(11)
* branch_id : int(11)
* fullname : varchar(100)
* status : enum('active','inactive')
* created_at : timestamp
* pin_code : varchar(10)
v hotel_booking_db rooms
* id : int(11)
* room_number : varchar(50)
* room_type : enum('hotel','meeting')
* name : varchar(100)
* capacity : int(11)
* price : decimal(10,2)
* status : enum('available','occupied','maintenance')
* cleaning_status : enum('clean','cleaning','dirty')
* description : text
* image_url : varchar(255)
* created_at : timestamp
v hotel_booking_db shifts
* id : int(11)
* user_id : int(11)
* shift_date : date
* shift_label : enum('morning','afternoon','night')
* opened_at : datetime
* closed_at : datetime
* opening_cash : decimal(10,2)
* closing_cash : decimal(10,2)
* expected_cash : decimal(10,2)
* difference : decimal(10,2)
* notes : text
* status : enum('open','closed')
v hotel_booking_db system_settings
* setting_key : varchar(100)
* setting_value : text
* updated_at : timestamp
v hotel_booking_db users
* id : int(11)
* username : varchar(50)
* password : varchar(255)
* fullname : varchar(100)
* role : enum('admin','manager','staff','cashier','housekeeper')
* created_at : timestamp
Create relationship
FOREIGN KEY
on delete
on update
Delete relationship