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 pos_db branches
* id : int(11)
* code : varchar(50)
* name : varchar(200)
* address : text
* phone : varchar(50)
* is_active : tinyint(1)
* created_at : timestamp
v pos_db card_sessions
* id : int(11)
* card_id : int(11)
* branch_id : int(11)
* card_holder : varchar(100)
* check_in_at : timestamp
* check_out_at : timestamp
* time_fee : decimal(10,2)
* food_total : decimal(10,2)
* net_total : decimal(10,2)
* status : enum('open','closed')
v pos_db categories
* id : int(11)
* name : varchar(100)
* description : text
* printer_target : varchar(50)
* created_at : timestamp
* track_inventory : tinyint(1)
v pos_db category_branch_visibility
* category_id : int(11)
* branch_id : int(11)
v pos_db customers
* id : int(11)
* name : varchar(100)
* phone : varchar(20)
* points : int(11)
* total_spent : decimal(10,2)
* is_active : tinyint(1)
* created_at : timestamp
* tax_id : varchar(50)
* address : text
* tax_branch_code : varchar(10)
* company_name : varchar(255)
v pos_db discounts
* id : int(11)
* name : varchar(100)
* type : enum('percentage','fixed')
* value : decimal(10,2)
* is_active : tinyint(1)
v pos_db display_sync
* branch_id : int(11)
* cart_data : longtext
* totals_data : longtext
* qr_data : longtext
* payment_data : longtext
* updated_at : timestamp
v pos_db document_sequences
* doc_type : varchar(50)
* year : int(11)
* last_number : int(11)
* updated_at : timestamp
v pos_db expenses
* id : int(11)
* branch_id : int(11)
* category_id : int(11)
* amount : decimal(10,2)
* expense_date : date
* description : text
* user_id : int(11)
* created_at : timestamp
v pos_db expense_categories
* id : int(11)
* name : varchar(100)
* description : text
v pos_db loyalty_history
* id : int(11)
* customer_id : int(11)
* order_id : int(11)
* points_change : int(11)
* type : enum('earn','redeem','adjust')
* note : text
* created_at : timestamp
v pos_db open_tickets
* id : int(11)
* ticket_name : varchar(100)
* branch_id : int(11)
* cashier_id : int(11)
* items_json : text
* discount_json : text
* subtotal : decimal(10,2)
* table_id : int(11)
* kitchen_status : varchar(50)
* prepared_at : timestamp
* created_at : timestamp
* updated_at : timestamp
* is_guest : tinyint(1)
v pos_db orders
* id : int(11)
* branch_id : int(11)
* table_id : int(11)
* order_number : varchar(50)
* total_amount : decimal(10,2)
* discount_amount : decimal(10,2)
* tax_amount : decimal(10,2)
* net_amount : decimal(10,2)
* received_amount : decimal(10,2)
* change_amount : decimal(10,2)
* payment_type : varchar(100)
* payment_type_id : int(11)
* card_uid : varchar(50)
* status : enum('completed','void','hold')
* kitchen_status : varchar(50)
* prepared_at : timestamp
* customer_id : int(11)
* points_redeemed : int(11)
* points_earned : int(11)
* note : text
* items_json : text
* cashier_id : int(11)
* created_at : timestamp
* is_guest : tinyint(1)
v pos_db order_items
* id : int(11)
* order_id : int(11)
* product_id : int(11)
* product_name : varchar(200)
* quantity : int(11)
* price_per_unit : decimal(10,2)
* subtotal : decimal(10,2)
* cost_price : decimal(10,2)
* total_price : decimal(10,2)
* created_at : timestamp
* kitchen_status : varchar(20)
* item_key : varchar(50)
* parent_id : int(11)
* parent_key : varchar(50)
v pos_db payment_types
* id : int(11)
* name : varchar(100)
* icon : varchar(50)
* is_active : tinyint(1)
* sort_order : int(11)
v pos_db pos_settings
* setting_key : varchar(100)
* setting_value : text
* setting_group : varchar(50)
* branch_id : int(11)
* updated_at : timestamp
v pos_db pos_shifts
* id : int(11)
* branch_id : int(11)
* user_id : int(11)
* opening_time : timestamp
* closing_time : timestamp
* opening_cash : decimal(10,2)
* closing_cash_actual : decimal(10,2)
* closing_cash_expected : decimal(10,2)
* total_sales : decimal(10,2)
* status : enum('open','closed')
* note : text
* created_at : timestamp
v pos_db pos_users
* id : int(11)
* username : varchar(50)
* password_hash : varchar(255)
* full_name : varchar(100)
* role : enum('admin','manager','cashier')
* branch_id : int(11)
* is_active : tinyint(1)
* last_login : datetime
* created_at : timestamp
v pos_db printers
* id : int(11)
* name : varchar(100)
* ip_address : varchar(50)
* port : int(11)
* branch_id : int(11)
* type : enum('kitchen','bar','master','receipt')
* is_active : tinyint(1)
* created_at : timestamp
v pos_db products
* id : int(11)
* category_id : int(11)
* barcode : varchar(50)
* name : varchar(200)
* description : text
* image : varchar(255)
* cost_price : decimal(10,2)
* sale_price : decimal(10,2)
* stock_qty : int(11)
* low_stock_threshold : int(11)
* is_active : tinyint(1)
* created_at : timestamp
* updated_at : timestamp
* printer_target : enum('none','kitchen','bar')
v pos_db product_stocks
* id : int(11)
* product_id : int(11)
* branch_id : int(11)
* quantity : int(11)
* is_active : tinyint(1)
* last_updated : timestamp
v pos_db restaurant_tables
* id : int(11)
* branch_id : int(11)
* name : varchar(50)
* zone : varchar(50)
* seat_count : int(11)
* status : enum('available','occupied','reserved')
* last_cleared_at : timestamp
* current_ticket_id : int(11)
* created_at : timestamp
v pos_db role_permissions
* id : int(11)
* role : enum('admin','manager','cashier')
* menu_key : varchar(50)
* is_allowed : tinyint(1)
v pos_db smart_cards
* id : int(11)
* card_uid : varchar(50)
* card_holder : varchar(100)
* status : enum('active','blocked','deleted')
* created_at : timestamp
v pos_db stock_logs
* id : int(11)
* branch_id : int(11)
* product_id : int(11)
* change_qty : int(11)
* cost_price : decimal(10,2)
* current_stock : int(11)
* type : varchar(50)
* reason : enum('sale','restock','adjustment','return','void','transfer','transfer_approved','transfer_received')
* reference : varchar(50)
* reference_id : varchar(50)
* note : text
* user_id : int(11)
* created_at : timestamp
v pos_db stock_transfers
* id : int(11)
* reference_no : varchar(50)
* from_branch_id : int(11)
* to_branch_id : int(11)
* product_id : int(11)
* quantity : int(11)
* note : text
* created_by : int(11)
* status : enum('pending','completed','cancelled')
* notified_at : timestamp
* created_at : timestamp
v pos_db taxes
* id : int(11)
* name : varchar(100)
* rate : decimal(10,2)
* type : enum('included','added')
* is_active : tinyint(1)
v pos_db tax_invoices
* id : int(11)
* invoice_number : varchar(50)
* order_id : int(11)
* branch_id : int(11)
* issued_by : int(11)
* customer_name : varchar(255)
* customer_address : text
* customer_tax_id : varchar(50)
* customer_phone : varchar(50)
* subtotal : decimal(10,2)
* vat_rate : decimal(5,2)
* vat_amount : decimal(10,2)
* total_amount : decimal(10,2)
* status : enum('active','voided')
* voided_at : timestamp
* voided_by : int(11)
* void_reason : text
* note : text
* created_at : timestamp
v pos_db tax_invoice_sequences
* id : int(11)
* year : year(4)
* last_number : int(11)
v pos_db void_requests
* id : int(11)
* order_id : int(11)
* requester_id : int(11)
* reason : text
* status : enum('pending','approved','rejected')
* approved_by : int(11)
* created_at : timestamp
Create relationship
FOREIGN KEY
on delete
on update
Delete relationship