=== DATABASE TABLES & ROW COUNTS ===
Table: activity_logs (3 rows)
Table: admin_order_notes (0 rows)
Table: admin_role_permissions (34 rows)
Table: admin_roles (5 rows)
Table: admins (2 rows)
Table: customers (3 rows)
Table: email_queue (0 rows)
Table: invoice_items (1 rows)
Table: invoices (3 rows)
Table: notifications_queue (0 rows)
Table: order_files (8 rows)
Table: order_items (12 rows)
Table: order_tracking_logs (10 rows)
Table: orders (14 rows)
Table: payments (1 rows)
Table: product_faqs (39 rows)
Table: product_images (38 rows)
Table: product_materials (70 rows)
Table: product_sizes (46 rows)
Table: products (43 rows)
Table: quotations (0 rows)
Table: rate_limits (1 rows)
Table: review_tokens (1 rows)
Table: reviews (0 rows)
Table: settings (24 rows)
Table: voucher_rules (26 rows)
Table: voucher_usages (0 rows)
Table: vouchers (15 rows)

=== DETAIL OF EACH TABLE SCHEMA ===

Table: activity_logs
 - id (int(11)) Null:NO Key:PRI Default:
 - admin_id (int(11)) Null:YES Key:MUL Default:
 - ip_address (varchar(45)) Null:NO Key: Default:
 - user_agent (varchar(255)) Null:NO Key: Default:
 - action (varchar(100)) Null:NO Key: Default:
 - old_data (longtext) Null:YES Key: Default:
 - new_data (longtext) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key:MUL Default:current_timestamp()
 - entity_type (varchar(50)) Null:YES Key:MUL Default:
 - entity_id (varchar(50)) Null:YES Key: Default:
 - description (text) Null:YES Key: Default:

Table: admin_order_notes
 - id (int(11)) Null:NO Key:PRI Default:
 - order_id (varchar(30)) Null:NO Key:MUL Default:
 - admin_id (int(11)) Null:YES Key:MUL Default:
 - admin_name (varchar(100)) Null:YES Key: Default:
 - note (text) Null:NO Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: admin_role_permissions
 - id (int(11)) Null:NO Key:PRI Default:
 - role_id (int(11)) Null:NO Key:MUL Default:
 - permission (varchar(100)) Null:NO Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: admin_roles
 - id (int(11)) Null:NO Key:PRI Default:
 - name (varchar(50)) Null:NO Key:UNI Default:
 - display_name (varchar(100)) Null:NO Key: Default:
 - description (text) Null:YES Key: Default:
 - is_system (tinyint(1)) Null:NO Key: Default:0
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: admins
 - id (int(11)) Null:NO Key:PRI Default:
 - name (varchar(100)) Null:YES Key: Default:
 - email (varchar(150)) Null:YES Key:UNI Default:
 - username (varchar(50)) Null:NO Key:UNI Default:
 - password (varchar(255)) Null:NO Key: Default:
 - fullname (varchar(100)) Null:NO Key: Default:
 - role (enum('superadmin','admin')) Null:NO Key: Default:admin
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()
 - updated_at (timestamp) Null:NO Key: Default:current_timestamp()
 - role_id (int(11)) Null:YES Key: Default:
 - avatar (varchar(255)) Null:YES Key: Default:
 - is_active (tinyint(1)) Null:NO Key: Default:1
 - last_login_at (timestamp) Null:YES Key: Default:

Table: customers
 - id (int(11)) Null:NO Key:PRI Default:
 - customer_code (varchar(50)) Null:NO Key:UNI Default:
 - name (varchar(150)) Null:NO Key: Default:
 - phone (varchar(40)) Null:NO Key:UNI Default:
 - email (varchar(150)) Null:YES Key: Default:
 - address (text) Null:YES Key: Default:
 - total_orders (int(11)) Null:YES Key: Default:0
 - total_spent (decimal(15,2)) Null:YES Key: Default:0.00
 - last_order_at (datetime) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()
 - updated_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: email_queue
 - id (int(11)) Null:NO Key:PRI Default:
 - to_email (varchar(150)) Null:NO Key: Default:
 - subject (varchar(255)) Null:NO Key: Default:
 - body (longtext) Null:NO Key: Default:
 - status (enum('pending','sending','sent','failed')) Null:YES Key: Default:pending
 - attempts (int(11)) Null:YES Key: Default:0
 - error_message (text) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()
 - processed_at (datetime) Null:YES Key: Default:

Table: invoice_items
 - id (int(11)) Null:NO Key:PRI Default:
 - invoice_id (int(11)) Null:NO Key:MUL Default:
 - order_item_id (int(11)) Null:YES Key:MUL Default:
 - product_name (varchar(255)) Null:NO Key: Default:
 - quantity (int(11)) Null:NO Key: Default:1
 - unit_price (decimal(15,2)) Null:NO Key: Default:0.00
 - subtotal (decimal(15,2)) Null:NO Key: Default:0.00
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: invoices
 - id (int(11)) Null:NO Key:PRI Default:
 - order_id (int(11)) Null:NO Key:UNI Default:
 - invoice_number (varchar(100)) Null:YES Key:UNI Default:
 - invoice_date (date) Null:YES Key: Default:
 - due_date (date) Null:YES Key: Default:
 - subtotal (decimal(15,2)) Null:NO Key: Default:0.00
 - discount (decimal(15,2)) Null:NO Key: Default:0.00
 - shipping_cost (decimal(15,2)) Null:NO Key: Default:0.00
 - total (decimal(15,2)) Null:NO Key: Default:0.00
 - payment_method (varchar(80)) Null:YES Key: Default:
 - payment_status (varchar(50)) Null:NO Key:MUL Default:draft
 - notes (text) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()
 - updated_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: notifications_queue
 - id (int(11)) Null:NO Key:PRI Default:
 - order_id (varchar(30)) Null:YES Key:MUL Default:
 - customer_phone (varchar(20)) Null:YES Key: Default:
 - customer_email (varchar(150)) Null:YES Key: Default:
 - channel (enum('whatsapp','email','sms')) Null:NO Key: Default:whatsapp
 - template_key (varchar(100)) Null:NO Key: Default:
 - payload (longtext) Null:YES Key: Default:
 - status (enum('pending','sent','failed','cancelled')) Null:NO Key:MUL Default:pending
 - attempts (tinyint(4)) Null:NO Key: Default:0
 - scheduled_at (timestamp) Null:YES Key:MUL Default:
 - sent_at (timestamp) Null:YES Key: Default:
 - error_message (text) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()
 - updated_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: order_files
 - id (int(11)) Null:NO Key:PRI Default:
 - order_id (int(11)) Null:NO Key:MUL Default:
 - order_item_id (int(11)) Null:YES Key:MUL Default:
 - file_path (varchar(255)) Null:NO Key: Default:
 - original_name (varchar(255)) Null:YES Key: Default:
 - stored_name (varchar(255)) Null:YES Key: Default:
 - file_type (varchar(50)) Null:YES Key: Default:
 - mime_type (varchar(120)) Null:YES Key: Default:
 - file_size (int(11)) Null:YES Key: Default:
 - uploaded_by (enum('customer','admin')) Null:NO Key: Default:customer
 - status (enum('uploaded','approved','revision_requested','rejected')) Null:NO Key: Default:uploaded
 - notes (text) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: order_items
 - id (int(11)) Null:NO Key:PRI Default:
 - order_id (int(11)) Null:NO Key:MUL Default:
 - product_id (int(11)) Null:YES Key:MUL Default:
 - product_slug (varchar(255)) Null:YES Key: Default:
 - product_name (varchar(255)) Null:NO Key: Default:
 - quantity (int(11)) Null:NO Key: Default:1
 - unit_price (decimal(15,2)) Null:NO Key: Default:0.00
 - subtotal (decimal(15,2)) Null:NO Key: Default:0.00
 - options (longtext) Null:YES Key: Default:
 - notes (text) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: order_tracking_logs
 - id (int(11)) Null:NO Key:PRI Default:
 - order_id (int(11)) Null:NO Key:MUL Default:
 - status (varchar(50)) Null:NO Key:MUL Default:
 - title (varchar(180)) Null:NO Key: Default:
 - description (text) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key:MUL Default:current_timestamp()
 - created_by (int(11)) Null:YES Key:MUL Default:
 - is_visible_to_customer (tinyint(1)) Null:NO Key:MUL Default:1
 - internal_note (text) Null:YES Key: Default:

Table: orders
 - id (int(11)) Null:NO Key:PRI Default:
 - order_id (varchar(20)) Null:NO Key:UNI Default:
 - customer_id (int(11)) Null:YES Key:MUL Default:
 - customer_name (varchar(150)) Null:NO Key: Default:
 - customer_phone (varchar(40)) Null:YES Key:MUL Default:
 - customer_email (varchar(150)) Null:YES Key: Default:
 - customer_address (text) Null:YES Key: Default:
 - notes (text) Null:YES Key: Default:
 - status (enum('draft','waiting_consultation','quotation','waiting_customer_approval','waiting_payment','paid','file_review','file_revision','ready_production','printing','finishing','quality_control','packing','shipping','ready_pickup','completed','cancelled','expired_draft')) Null:NO Key:MUL Default:draft
 - payment_status (varchar(30)) Null:NO Key:MUL Default:unpaid
 - payment_token (varchar(255)) Null:YES Key: Default:
 - total_amount (decimal(15,2)) Null:NO Key: Default:0.00
 - estimated_finish (datetime) Null:YES Key: Default:
 - completed_at (datetime) Null:YES Key: Default:
 - payment_date (datetime) Null:YES Key: Default:
 - voucher_generated (tinyint(1)) Null:NO Key: Default:0
 - review_requested (tinyint(1)) Null:NO Key: Default:0
 - created_at (timestamp) Null:NO Key:MUL Default:current_timestamp()
 - updated_at (timestamp) Null:NO Key: Default:current_timestamp()
 - estimated_finish_date (date) Null:YES Key: Default:
 - estimated_working_days (tinyint(3) unsigned) Null:YES Key: Default:
 - pickup_method (enum('pickup','shipping')) Null:YES Key: Default:
 - tracking_number (varchar(100)) Null:YES Key:MUL Default:
 - expired_at (timestamp) Null:YES Key:MUL Default:

Table: payments
 - id (int(11)) Null:NO Key:PRI Default:
 - invoice_id (int(11)) Null:NO Key:MUL Default:
 - amount (decimal(15,2)) Null:NO Key: Default:0.00
 - method (varchar(80)) Null:YES Key: Default:
 - status (varchar(50)) Null:NO Key:MUL Default:draft
 - reference (varchar(120)) Null:YES Key: Default:
 - paid_at (datetime) Null:YES Key: Default:
 - notes (text) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()
 - updated_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: product_faqs
 - id (int(11)) Null:NO Key:PRI Default:
 - product_id (int(11)) Null:NO Key:MUL Default:
 - sort_order (int(11)) Null:NO Key: Default:0
 - question (text) Null:NO Key: Default:
 - answer (text) Null:NO Key: Default:

Table: product_images
 - id (int(11)) Null:NO Key:PRI Default:
 - product_id (int(11)) Null:NO Key:MUL Default:
 - sort_order (int(11)) Null:NO Key: Default:0
 - image_path (varchar(255)) Null:NO Key: Default:
 - is_primary (tinyint(1)) Null:NO Key: Default:0

Table: product_materials
 - id (int(11)) Null:NO Key:PRI Default:
 - product_id (int(11)) Null:NO Key:MUL Default:
 - sort_order (int(11)) Null:NO Key: Default:0
 - name (varchar(150)) Null:NO Key: Default:
 - factor (decimal(5,2)) Null:NO Key: Default:1.00
 - description (text) Null:YES Key: Default:

Table: product_sizes
 - id (int(11)) Null:NO Key:PRI Default:
 - product_id (int(11)) Null:NO Key:MUL Default:
 - sort_order (int(11)) Null:NO Key: Default:0
 - name (varchar(150)) Null:NO Key: Default:
 - factor (decimal(5,2)) Null:NO Key: Default:1.00
 - description (text) Null:YES Key: Default:

Table: products
 - id (int(11)) Null:NO Key:PRI Default:
 - string_id (varchar(50)) Null:NO Key:UNI Default:
 - code (varchar(50)) Null:YES Key: Default:
 - name (varchar(255)) Null:NO Key: Default:
 - category (varchar(100)) Null:NO Key:MUL Default:
 - subcategory (varchar(100)) Null:YES Key: Default:
 - description (text) Null:YES Key: Default:
 - detail_description (longtext) Null:YES Key: Default:
 - price (decimal(15,2)) Null:NO Key: Default:
 - status (enum('active','inactive')) Null:NO Key: Default:active
 - badge (varchar(50)) Null:YES Key: Default:
 - estimated_days (varchar(100)) Null:YES Key: Default:
 - popular (tinyint(1)) Null:YES Key: Default:0
 - promo (tinyint(1)) Null:YES Key: Default:0
 - new_arrival (tinyint(1)) Null:YES Key: Default:0
 - slug (varchar(255)) Null:NO Key:UNI Default:
 - finishing (text) Null:YES Key: Default:
 - seo_title (varchar(255)) Null:YES Key: Default:
 - seo_description (text) Null:YES Key: Default:
 - schema_product (text) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()
 - updated_at (timestamp) Null:NO Key: Default:current_timestamp()
 - deleted_at (timestamp) Null:YES Key: Default:
 - voucher_override (varchar(50)) Null:NO Key: Default:global
 - shipping_override (varchar(50)) Null:NO Key: Default:global
 - minimum_order (int(11)) Null:NO Key: Default:1
 - order_step (int(11)) Null:NO Key: Default:1
 - views (int(11)) Null:YES Key: Default:0

Table: quotations
 - id (int(11)) Null:NO Key:PRI Default:
 - quotation_id (varchar(30)) Null:NO Key:UNI Default:
 - order_id (varchar(30)) Null:NO Key:MUL Default:
 - price (decimal(15,2)) Null:NO Key: Default:0.00
 - discount (decimal(15,2)) Null:NO Key: Default:0.00
 - final_price (decimal(15,2)) Null:NO Key: Default:0.00
 - note (text) Null:YES Key: Default:
 - internal_note (text) Null:YES Key: Default:
 - valid_until (timestamp) Null:YES Key: Default:
 - status (enum('draft','sent','approved','rejected','expired')) Null:NO Key:MUL Default:draft
 - created_by (int(11)) Null:YES Key:MUL Default:
 - approved_by (int(11)) Null:YES Key:MUL Default:
 - approved_at (timestamp) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()
 - updated_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: rate_limits
 - ip_address (varchar(45)) Null:NO Key:PRI Default:
 - endpoint (varchar(255)) Null:NO Key:PRI Default:
 - hits (int(11)) Null:NO Key: Default:
 - reset_time (datetime) Null:NO Key: Default:

Table: review_tokens
 - id (int(11)) Null:NO Key:PRI Default:
 - order_id (int(11)) Null:NO Key:MUL Default:
 - token (varchar(80)) Null:NO Key:UNI Default:
 - expired_at (datetime) Null:NO Key:MUL Default:
 - used_at (datetime) Null:YES Key: Default:
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: reviews
 - id (int(11)) Null:NO Key:PRI Default:
 - order_id (int(11)) Null:NO Key:MUL Default:
 - product_id (int(11)) Null:NO Key:MUL Default:
 - customer_id (int(11)) Null:YES Key:MUL Default:
 - customer_name (varchar(150)) Null:NO Key: Default:
 - rating (tinyint(4)) Null:NO Key: Default:
 - comment (text) Null:NO Key: Default:
 - image (varchar(1500)) Null:YES Key: Default:
 - status (enum('pending','approved','rejected')) Null:NO Key:MUL Default:pending
 - admin_reply (text) Null:YES Key: Default:
 - consent (tinyint(4)) Null:NO Key: Default:1
 - created_at (timestamp) Null:NO Key:MUL Default:current_timestamp()
 - updated_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: settings
 - key_name (varchar(100)) Null:NO Key:PRI Default:
 - key_value (text) Null:NO Key: Default:

Table: voucher_rules
 - id (int(11)) Null:NO Key:PRI Default:
 - name (varchar(150)) Null:NO Key: Default:
 - rule_type (varchar(50)) Null:NO Key: Default:
 - category (varchar(100)) Null:YES Key: Default:
 - product_slug (varchar(255)) Null:YES Key: Default:
 - min_qty (int(11)) Null:NO Key: Default:1
 - min_value (decimal(10,2)) Null:YES Key: Default:
 - option_keyword (varchar(100)) Null:YES Key: Default:
 - discount_type (enum('percent','nominal')) Null:NO Key: Default:percent
 - discount_value (decimal(15,2)) Null:NO Key: Default:
 - min_order_amount (decimal(15,2)) Null:NO Key: Default:0.00
 - max_discount (decimal(15,2)) Null:YES Key: Default:
 - valid_days (int(11)) Null:NO Key: Default:30
 - status (enum('active','inactive')) Null:NO Key: Default:active
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: voucher_usages
 - id (int(11)) Null:NO Key:PRI Default:
 - voucher_id (int(11)) Null:NO Key:MUL Default:
 - order_id (varchar(20)) Null:NO Key:MUL Default:
 - customer_name (varchar(150)) Null:NO Key: Default:
 - discount_applied (decimal(15,2)) Null:NO Key: Default:
 - used_at (timestamp) Null:NO Key: Default:current_timestamp()

Table: vouchers
 - id (int(11)) Null:NO Key:PRI Default:
 - voucher_code (varchar(50)) Null:NO Key:UNI Default:
 - order_id_source (varchar(20)) Null:YES Key:MUL Default:
 - customer_id (int(11)) Null:YES Key:MUL Default:
 - customer_name (varchar(150)) Null:NO Key: Default:
 - customer_phone (varchar(40)) Null:YES Key: Default:
 - discount_type (enum('percent','nominal')) Null:NO Key: Default:percent
 - discount_value (decimal(15,2)) Null:NO Key: Default:
 - min_order_amount (decimal(15,2)) Null:NO Key: Default:0.00
 - max_discount (decimal(15,2)) Null:YES Key: Default:
 - valid_until (datetime) Null:YES Key: Default:
 - status (enum('active','used','expired','cancelled')) Null:NO Key:MUL Default:active
 - created_at (timestamp) Null:NO Key: Default:current_timestamp()
 - used_at (datetime) Null:YES Key: Default:
