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 grocery_pos accounts_payable
* id : int(11)
* source_type : enum('purchase_order','inventory_request','operating_expense')
* source_id : int(11)
* supplier_id : int(11)
* payee_name : varchar(150)
* reference_label : varchar(150)
* amount_owed : decimal(12,2)
* amount_paid : decimal(12,2)
* due_date : date
* status : enum('unpaid','partial','paid')
* created_by : int(11)
* created_at : timestamp
* updated_at : timestamp
v grocery_pos ai_cache
* hash : char(64)
* response : longtext
* created_at : datetime
v grocery_pos ai_ingest_product_cooldowns
* user_id : int(11)
* product_id : int(11)
* last_attempt_at : datetime
v grocery_pos ai_ingest_rate_limits
* id : bigint(20) unsigned
* user_id : int(11)
* hit_at : datetime
v grocery_pos ai_settings
* id : int(11)
* model : varchar(80)
* daily_call_cap : int(11)
* daily_search_cap : int(11)
* enabled : tinyint(1)
* updated_at : datetime
v grocery_pos ai_usage_log
* id : bigint(20) unsigned
* task : varchar(50)
* model : varchar(80)
* image_hash : char(64)
* prompt_hash : char(64)
* input_tokens : int(11)
* output_tokens : int(11)
* user_id : int(11)
* status : enum('ok','cached','error','rate_limited','quota','no_model','capped')
* error : text
* created_at : datetime
v grocery_pos announcement_reads
* id : int(11)
* user_id : int(11)
* announcement_id : int(11)
* read_at : timestamp
v grocery_pos budgets
* id : int(11)
* period_start : date
* period_end : date
* category : enum('revenue','payroll','restock')
* budgeted_amount : decimal(12,2)
* notes : varchar(255)
* created_by : int(11)
* created_by_name : varchar(150)
* created_at : timestamp
* updated_at : timestamp
v grocery_pos capital_transactions
* id : int(11)
* type : enum('capital_in','capital_out')
* amount : decimal(12,2)
* reason : varchar(255)
* payroll_period_start : date
* payroll_period_end : date
* created_by : int(11)
* created_by_name : varchar(150)
* created_at : timestamp
v grocery_pos cashier_lane_schedule
* id : int(11)
* schedule_date : date
* employee_id : int(11)
* shift_id : int(11)
* block_start : time
* block_end : time
* lane_id : int(11)
* generated_at : timestamp
v grocery_pos categories
* id : int(11)
* category_name : varchar(80)
v grocery_pos discount_requests
* request_id : int(11)
* cashier_id : int(11)
* discount_type : enum('percent','fixed')
* discount_value : decimal(10,2)
* subtotal_at_request : decimal(10,2)
* computed_discount_amount : decimal(10,2)
* reason : varchar(255)
* status : enum('pending','approved','rejected','cancelled')
* reject_reason : varchar(255)
* decided_by : int(11)
* decided_at : timestamp
* requested_at : timestamp
v grocery_pos expense_categories
* id : int(11)
* name : varchar(100)
* is_recurring : tinyint(1)
* monthly_budget : decimal(12,2)
* status : enum('active','inactive')
v grocery_pos export_log
* id : int(11)
* user_id : int(11)
* username : varchar(100)
* role : varchar(30)
* report_name : varchar(100)
* format : enum('xlsx','pdf','csv')
* row_count : int(11)
* ip_address : varchar(45)
* created_at : timestamp
v grocery_pos inventory_requests
* request_id : int(11)
* requested_by_employee_id : int(11)
* product_id : int(11)
* supplier_id : int(11)
* item_name : varchar(150)
* quantity : int(11)
* estimated_cost : decimal(10,2)
* validated_by : int(11)
* validated_at : timestamp
* notes : text
* letter_purpose : text
* requester_signature_name : varchar(150)
* requester_signature_file : varchar(255)
* requester_sign_ip : varchar(64)
* requester_sign_ua : varchar(255)
* supplier_signatory_name : varchar(150)
* supplier_signature_file : varchar(255)
* formality_letter_file : varchar(255)
* letter_integrity_hash : varchar(64)
* supplier_sign_token : varchar(64)
* supplier_sign_token_expires : timestamp
* supplier_sign_requested_at : timestamp
* supplier_signed_at : timestamp
* supplier_sign_ip : varchar(64)
* supplier_sign_ua : varchar(255)
* status : enum('pending_validation','pending_finance','pending_supplier','ready_to_receive','approved','rejected','fulfilled')
* decided_by : int(11)
* decided_at : timestamp
* finance_signature : longtext
* finance_signature_at : datetime
* finance_approved_by : int(11)
* finance_approved_at : timestamp
* finance_signature_name : varchar(150)
* finance_signature_file : varchar(255)
* finance_sign_ip : varchar(64)
* finance_sign_ua : varchar(255)
* received_by : int(11)
* received_at : timestamp
* requested_at : timestamp
* requester_full_name : varchar(150)
* requester_signature : longtext
* requester_signature_at : datetime
* requester_signature_checked_by : int(11)
* requester_signature_checked_at : datetime
* procurement_letter : longtext
* supplier_approval_token_hash : char(64)
* supplier_approval_expires_at : datetime
* supplier_signature : longtext
* supplier_signature_at : datetime
v grocery_pos login_ip_throttle
* id : int(11)
* ip_address : varchar(45)
* attempted_at : timestamp
v grocery_pos notifications
* id : int(11)
* product_id : int(11)
* user_id : int(11)
* category : varchar(20)
* type : varchar(40)
* message : varchar(255)
* source_type : varchar(30)
* source_id : int(11)
* is_read : tinyint(1)
* date_created : timestamp
* is_archived : tinyint(1)
v grocery_pos operating_expenses
* id : int(11)
* category_id : int(11)
* payee_name : varchar(150)
* description : varchar(255)
* billing_period_start : date
* billing_period_end : date
* due_date : date
* amount : decimal(12,2)
* is_recurring : tinyint(1)
* receipt_file_path : varchar(255)
* status : enum('draft','pending_verification','verified','pending_approval','approved','returned','cancelled')
* requires_level2_approval : tinyint(1)
* over_budget_flag : tinyint(1)
* over_budget_reason : varchar(255)
* encoded_by : int(11)
* encoded_by_name : varchar(150)
* verified_by : int(11)
* verified_by_name : varchar(150)
* verified_at : timestamp
* approved_by : int(11)
* approved_by_name : varchar(150)
* approved_at : timestamp
* return_reason : varchar(255)
* returned_at : timestamp
* cancelled_by : int(11)
* cancelled_at : timestamp
* submitted_at : timestamp
* created_at : timestamp
* updated_at : timestamp
v grocery_pos password_reset_requests
* request_id : bigint(20) unsigned
* username : varchar(254)
* ip_hash : char(64)
* user_agent : varchar(255)
* status : enum('pending','approved','handled','dismissed')
* handled_by : int(11)
* handled_at : datetime
* notes : varchar(500)
* requested_at : timestamp
* user_id : int(11)
* approved_by : int(11)
* approved_at : datetime
* token_hash : char(64)
* token_expires_at : datetime
* email_sent_at : datetime
* used_at : datetime
* account_system : enum('pos','hrms')
v grocery_pos pos_lanes
* lane_id : int(11)
* lane_number : int(11)
* lane_name : varchar(50)
* is_active : tinyint(1)
v grocery_pos products
* id : int(11)
* product_name : varchar(150)
* barcode : varchar(64)
* category : varchar(80)
* price : decimal(10,2)
* discount_type : enum('none','percent','fixed')
* discount_value : decimal(10,2)
* discount_reason : varchar(100)
* cost_price : decimal(10,2)
* stock : int(11)
* supplier : varchar(255)
* supplier_id : int(11)
* expiry_date : date
* image : varchar(255)
* date_added : timestamp
* is_active : tinyint(1)
v grocery_pos product_batches
* id : int(11)
* product_id : int(11)
* quantity_received : int(11)
* quantity_remaining : int(11)
* cost_price : decimal(10,2)
* expiry_date : date
* date_received : datetime
* added_by : int(11)
* notes : varchar(255)
v grocery_pos product_details
* detail_id : int(10) unsigned
* product_id : int(11)
* description : text
* ingredients : text
* allergens : varchar(500)
* brand : varchar(100)
* unit_name : varchar(50)
* net_weight : varchar(50)
* storage_notes : text
* nutrition_basis : enum('per_serving','per_100g')
* serving_size : varchar(50)
* servings_per_pack : decimal(6,2)
* calories : decimal(8,2)
* protein_g : decimal(8,2)
* carbs_g : decimal(8,2)
* fat_g : decimal(8,2)
* sugar_g : decimal(8,2)
* sodium_mg : decimal(8,2)
* nutrition_source : enum('label_photo','web','manual')
* nutrition_source_url : varchar(500)
* review_status : enum('draft','ai_filled','needs_review','verified','rejected')
* updated_by : int(11)
* verified_by : int(11)
* verified_at : datetime
* rejected_reason : varchar(1000)
* created_at : timestamp
* updated_at : timestamp
v grocery_pos product_detail_audit
* audit_id : bigint(20) unsigned
* product_id : int(11)
* changed_by : int(11)
* action : varchar(32)
* source : enum('manual','ai')
* review_status : varchar(32)
* before_json : longtext
* after_json : longtext
* changed_at : timestamp
v grocery_pos product_discount_requests
* request_id : int(11)
* product_id : int(11)
* requested_by : int(11)
* discount_type : enum('none','percent','fixed')
* discount_value : decimal(10,2)
* discount_reason : varchar(255)
* price_at_request : decimal(10,2)
* old_discount_type : enum('none','percent','fixed')
* old_discount_value : decimal(10,2)
* old_discount_reason : varchar(255)
* status : enum('pending','approved','rejected','cancelled')
* reject_reason : varchar(255)
* decided_by : int(11)
* decided_at : timestamp
* requested_at : timestamp
v grocery_pos product_scan_events
* id : bigint(20) unsigned
* product_id : int(11)
* scanned_at : datetime
* source : enum('kiosk','phone','catalog_click')
* ip_hash : char(64)
v grocery_pos purchase_orders
* id : int(11)
* po_number : varchar(20)
* supplier_id : int(11)
* status : enum('draft','pending_approval','approved','rejected','ordered','partially_received','received','cancelled')
* notes : text
* created_by : int(11)
* created_by_name : varchar(150)
* submitted_at : timestamp
* approved_by : int(11)
* approved_at : timestamp
* rejected_by : int(11)
* rejected_at : timestamp
* rejection_reason : varchar(255)
* ordered_at : timestamp
* received_at : timestamp
* cancelled_by : int(11)
* cancelled_at : timestamp
* created_at : timestamp
* updated_at : timestamp
v grocery_pos purchase_order_items
* id : int(11)
* po_id : int(11)
* product_id : int(11)
* item_name : varchar(150)
* quantity_ordered : int(11)
* quantity_received : int(11)
* unit_cost : decimal(10,2)
* subtotal : decimal(12,2)
v grocery_pos queue_tickets
* ticket_id : int(11)
* queue_date : date
* lane_id : int(11)
* ticket_number : int(11)
* status : enum('waiting','serving','done','skipped','cancelled')
* issued_at : timestamp
* called_at : timestamp
* completed_at : timestamp
* served_by : int(11)
v grocery_pos rate_limit_public
* id : bigint(20) unsigned
* ip_hash : char(64)
* route : varchar(40)
* hit_at : timestamp
v grocery_pos sales
* id : int(11)
* cashier_id : int(11)
* total_amount : decimal(10,2)
* discount_amount : decimal(10,2)
* discount_id_number : varchar(50)
* discount_holder_name : varchar(150)
* discount_approved_by_name : varchar(150)
* payment : decimal(10,2)
* change_amount : decimal(10,2)
* status : enum('completed','voided','refunded','partial_refunded')
* refund_reason : varchar(500)
* refunded_at : datetime
* refunded_by : int(11)
* refund_approved_by_name : varchar(150)
* transaction_date : timestamp
v grocery_pos sales_details
* id : int(11)
* sale_id : int(11)
* product_id : int(11)
* quantity : int(11)
* subtotal : decimal(10,2)
v grocery_pos sale_batch_consumption
* id : int(11)
* sales_detail_id : int(11)
* batch_id : int(11)
* quantity : int(11)
v grocery_pos sale_refunds
* id : int(11)
* sale_id : int(11)
* sales_detail_id : int(11)
* product_id : int(11)
* quantity : int(11)
* amount : decimal(10,2)
* reason : varchar(255)
* refunded_by : int(11)
* approved_by_name : varchar(150)
* refunded_at : timestamp
v grocery_pos stock_logs
* id : int(11)
* product_id : int(11)
* sale_id : int(11)
* change_type : enum('sale','void','refund','restock','adjust','issuance')
* quantity_change : int(11)
* previous_stock : int(11)
* new_stock : int(11)
* reason : varchar(255)
* total_cost : decimal(10,2)
* user_id : int(11)
* date_created : timestamp
* validated_by : int(11)
* validated_at : timestamp
v grocery_pos store_settings
* id : int(11)
* setting_key : varchar(100)
* setting_value : text
* updated_at : timestamp
v grocery_pos suppliers
* id : int(11)
* company_name : varchar(150)
* contact_person : varchar(150)
* contact_number : varchar(30)
* email : varchar(150)
* address : varchar(255)
* status : enum('active','inactive')
* payment_terms_days : int(11)
* notes : text
* created_by : int(11)
* created_at : timestamp
* updated_at : timestamp
* procurement_signature_reference : longtext
* procurement_signature_enrolled_at : datetime
v grocery_pos supplier_payments
* id : int(11)
* payable_id : int(11)
* amount : decimal(12,2)
* payment_method : varchar(50)
* reference_no : varchar(100)
* notes : text
* paid_by : int(11)
* paid_by_name : varchar(150)
* created_at : timestamp
v grocery_pos users
* id : int(11)
* employee_id : int(11)
* username : varchar(50)
* password : varchar(255)
* full_name : varchar(100)
* profile_picture : varchar(255)
* specimen_signature_file : varchar(255)
* role : enum('admin','cashier','inventory_staff','finance')
* created_at : timestamp
* force_logout : tinyint(1)
* is_active : tinyint(1)
* synced_from_hrms : tinyint(1)
* failed_attempts : int(11)
* is_locked : tinyint(1)
* two_factor_enabled : tinyint(1)
* two_factor_email : varchar(150)
* two_factor_backup_codes : text
* procurement_signature_reference : longtext
* procurement_signature_enrolled_at : datetime
* two_factor_failed_attempts : int(11)
* two_factor_locked_until : datetime
v grocery_pos vendor_ratings
* id : int(11)
* supplier_id : int(11)
* vendor_name : varchar(150)
* rating_date : date
* on_time_delivery : tinyint(1)
* quality_issue : tinyint(1)
* notes : varchar(255)
* rated_by : int(11)
* updated_by : int(11)
* updated_by_name : varchar(150)
* updated_at : timestamp
* created_at : timestamp
Create relationship
FOREIGN KEY
on delete
on update
Delete relationship