-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3307
-- Generation Time: Oct 19, 2026 at 09:07 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.0.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `gamingarenav1`
--

-- --------------------------------------------------------

--
-- Table structure for table `ai_voice_commands`
--

CREATE TABLE `ai_voice_commands` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `operator_name` varchar(255) NOT NULL DEFAULT 'Front Desk Reception',
  `transcribed_text` text NOT NULL,
  `intent_detected` varchar(100) NOT NULL,
  `execution_status` varchar(30) NOT NULL DEFAULT 'success',
  `response_text` text NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ai_voice_commands`
--

INSERT INTO `ai_voice_commands` (`id`, `tenant_id`, `operator_name`, `transcribed_text`, `intent_detected`, `execution_status`, `response_text`, `created_at`, `updated_at`) VALUES
(1, 1, 'Reception iPad 1', 'Book Court 1 for Daniyal Ahmed tomorrow night at 8 PM and charge to his wallet', 'book_court', 'success', 'Court 1 (Panoramic Glass) reserved for Daniyal Ahmed on Saturday at 8:00 PM. Rs. 4,500 debited from stored wallet balance.', '2026-10-17 16:21:26', '2026-10-17 16:21:26'),
(2, 1, 'Reception iPad 1', 'Turn on court lighting for court 2 immediately', 'iot_lights_on', 'success', 'Court 2 floodlight relay packet dispatched via MQTT. Lights switched ON.', '2026-10-17 15:46:26', '2026-10-17 15:46:26');

-- --------------------------------------------------------

--
-- Table structure for table `arena_sound_fx`
--

CREATE TABLE `arena_sound_fx` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `title` varchar(255) NOT NULL,
  `trigger_event` varchar(255) NOT NULL,
  `sound_file_url` varchar(255) NOT NULL,
  `led_color_hex` varchar(255) NOT NULL DEFAULT '#10B981',
  `strobe_pattern` varchar(255) NOT NULL DEFAULT 'pulse',
  `duration_sec` int(11) NOT NULL DEFAULT 4,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `arena_sound_fx`
--

INSERT INTO `arena_sound_fx` (`id`, `tenant_id`, `title`, `trigger_event`, `sound_file_url`, `led_color_hex`, `strobe_pattern`, `duration_sec`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 1, 'Stadium Megahorn & Bass Drop', 'ace', '/sounds/sfx_airhorn_bass.mp3', '#10B981', 'strobe', 4, 1, '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(2, 1, 'Super Six Maximum Cannon', 'six', '/sounds/sfx_six_cannon.mp3', '#F59E0B', 'blast', 5, 1, '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(3, 1, 'Championship Match Point Siren', 'match_point', '/sounds/sfx_siren_tension.mp3', '#EF4444', 'pulse', 6, 1, '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(4, 1, 'Victory Crowd Roar & Confetti Fanfare', 'victory', '/sounds/sfx_victory_crowd.mp3', '#8B5CF6', 'chase', 7, 1, '2026-10-17 17:47:05', '2026-10-17 17:47:05');

-- --------------------------------------------------------

--
-- Table structure for table `asset_maintenance_logs`
--

CREATE TABLE `asset_maintenance_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `asset_id` bigint(20) UNSIGNED NOT NULL,
  `maintenance_date` date NOT NULL,
  `service_type` varchar(255) NOT NULL,
  `cost` decimal(10,2) NOT NULL DEFAULT 0.00,
  `performed_by` varchar(255) DEFAULT NULL,
  `findings` text DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'completed',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `asset_maintenance_logs`
--

INSERT INTO `asset_maintenance_logs` (`id`, `tenant_id`, `asset_id`, `maintenance_date`, `service_type`, `cost`, `performed_by`, `findings`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 1, '2026-08-10', 'routine_check', 15000.00, 'Arena Senior Technical Officer', 'Passed electrical, structural and safety audit tests 100%.', 'completed', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(2, 1, 2, '2026-09-01', 'routine_check', 15000.00, 'Arena Senior Technical Officer', 'Passed electrical, structural and safety audit tests 100%.', 'completed', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(3, 1, 3, '2026-07-15', 'routine_check', 15000.00, 'Arena Senior Technical Officer', 'Passed electrical, structural and safety audit tests 100%.', 'completed', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(4, 1, 4, '2026-06-12', 'routine_check', 15000.00, 'Arena Senior Technical Officer', 'Passed electrical, structural and safety audit tests 100%.', 'completed', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(5, 1, 5, '2026-08-25', 'routine_check', 15000.00, 'Arena Senior Technical Officer', 'Passed electrical, structural and safety audit tests 100%.', 'completed', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(6, 1, 6, '2026-09-10', 'routine_check', 15000.00, 'Arena Senior Technical Officer', 'Passed electrical, structural and safety audit tests 100%.', 'completed', '2026-10-17 19:35:19', '2026-10-17 19:35:19');

-- --------------------------------------------------------

--
-- Table structure for table `attendance`
--

CREATE TABLE `attendance` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `attendances`
--

CREATE TABLE `attendances` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `details` longtext DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `bank_accounts`
--

CREATE TABLE `bank_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `bank_name` varchar(255) NOT NULL,
  `account_name` varchar(255) NOT NULL,
  `account_number` varchar(255) NOT NULL,
  `account_type` varchar(255) NOT NULL DEFAULT 'bank',
  `opening_balance` decimal(14,2) NOT NULL DEFAULT 0.00,
  `current_balance` decimal(14,2) NOT NULL DEFAULT 0.00,
  `currency` varchar(10) NOT NULL DEFAULT 'PKR',
  `status` varchar(20) NOT NULL DEFAULT 'active',
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bank_accounts`
--

INSERT INTO `bank_accounts` (`id`, `tenant_id`, `bank_name`, `account_name`, `account_number`, `account_type`, `opening_balance`, `current_balance`, `currency`, `status`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 'Habib Bank Limited (HBL)', 'Gaming Arena Operating', 'PK64HABB00012345678901', 'bank', 2500000.00, 2500000.00, 'PKR', 'active', 'Primary corporate settlement account', '2026-10-17 11:59:34', '2026-10-17 11:59:34'),
(2, 1, 'Main Cash Drawer / Vault', 'Front Desk Reception Till', 'CASH-TILL-01', 'cash', 150000.00, 150000.00, 'PKR', 'active', 'Cash float for front reception counters', '2026-10-17 11:59:34', '2026-10-17 11:59:34'),
(3, 1, 'PayFast Digital Merchant', 'Online Web & App Collections', 'PF-MERCHANT-8821', 'digital_wallet', 450000.00, 450000.00, 'PKR', 'active', 'Instant card and mobile wallet collections gateway', '2026-10-17 11:59:34', '2026-10-17 11:59:34');

-- --------------------------------------------------------

--
-- Table structure for table `bank_transactions`
--

CREATE TABLE `bank_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `bank_account_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(255) NOT NULL,
  `amount` decimal(14,2) NOT NULL,
  `reference` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `running_balance` decimal(14,2) NOT NULL DEFAULT 0.00,
  `transaction_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_reconciled` tinyint(1) DEFAULT 0,
  `reconciled_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bank_transactions`
--

INSERT INTO `bank_transactions` (`id`, `tenant_id`, `bank_account_id`, `type`, `amount`, `reference`, `description`, `running_balance`, `transaction_date`, `created_at`, `updated_at`, `is_reconciled`, `reconciled_at`) VALUES
(7, 1, 1, 'credit', 150000.00, 'DEP-20261015-01', 'Weekly Arena Cash & Booking Counter Deposit', 1450000.00, '2026-10-14', '2026-10-14 14:42:01', '2026-10-14 14:42:01', 0, NULL),
(8, 1, 1, 'debit', 45000.00, 'CHQ-778102', 'Court High-Mast Floodlights LED Maintenance & Bulb Replacements', 1405000.00, '2026-10-15', '2026-10-15 14:42:01', '2026-10-15 14:42:01', 0, NULL),
(9, 1, 1, 'credit', 102000.00, 'RENT-INV-1', 'Commercial Rent Collection: FitBites Café October Slab Due', 1507000.00, '2026-10-16', '2026-10-16 14:42:01', '2026-10-16 14:42:01', 0, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `biometric_access_logs`
--

CREATE TABLE `biometric_access_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `member_name` varchar(255) NOT NULL,
  `biometric_device` varchar(100) NOT NULL DEFAULT 'Main Entrance Face Scanner #1',
  `confidence_score` decimal(5,2) NOT NULL DEFAULT 99.20,
  `membership_tier` varchar(50) NOT NULL DEFAULT 'VIP Gold',
  `access_status` varchar(20) NOT NULL DEFAULT 'granted',
  `scanned_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `biometric_access_logs`
--

INSERT INTO `biometric_access_logs` (`id`, `tenant_id`, `customer_id`, `member_name`, `biometric_device`, `confidence_score`, `membership_tier`, `access_status`, `scanned_at`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Malik Jahangir', 'Padel Arena Turnstile #1', 99.85, 'VIP Platinum Club', 'granted', '2026-10-17 16:21:29', '2026-10-17 16:21:29', '2026-10-17 16:21:29'),
(2, 1, 2, 'Sara Farooq', 'Ladies Gym & Court #3 Gate', 98.90, 'All-Access Gold', 'granted', '2026-10-17 15:58:29', '2026-10-17 15:58:29', '2026-10-17 15:58:29'),
(3, 1, 3, 'Unrecognized Visitor #402', 'VIP Lounge Entrance', 45.20, 'None', 'denied_unregistered', '2026-10-17 15:45:29', '2026-10-17 15:45:29', '2026-10-17 15:45:29');

-- --------------------------------------------------------

--
-- Table structure for table `bookings`
--

CREATE TABLE `bookings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `reminder_sent_at` timestamp NULL DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `payment_gateway` varchar(255) DEFAULT NULL,
  `amount_paid` decimal(10,2) DEFAULT 0.00,
  `discount_amount` decimal(10,2) DEFAULT 0.00,
  `promo_code` varchar(255) DEFAULT NULL,
  `booking_type` varchar(255) DEFAULT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `customer_phone` varchar(255) DEFAULT NULL,
  `customer_email` varchar(255) DEFAULT NULL,
  `payment_hold_expires_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bookings`
--

INSERT INTO `bookings` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `reminder_sent_at`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `payment_gateway`, `amount_paid`, `discount_amount`, `promo_code`, `booking_type`, `customer_name`, `customer_phone`, `customer_email`, `payment_hold_expires_at`) VALUES
(1, 1, NULL, NULL, 2, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 19:00:00', '2026-10-16 20:00:00', 8, NULL, 'paid', 3000.00, 'Court 2', '2026-10-16 11:00:00', '2026-10-16 15:00:00', 'PayFast (Debit/Credit)', 3000.00, 0.00, NULL, 'regular', 'Babar Azam', '03001112233', 'player_980@gamingarena.com', NULL),
(2, 1, NULL, NULL, 6, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-06 23:00:00', '2026-10-07 01:00:00', 7, NULL, 'paid', 6000.00, 'Court 2', '2026-10-06 02:00:00', '2026-10-06 20:00:00', 'PayFast (Debit/Credit)', 6000.00, 0.00, NULL, 'regular', 'Zayd Khan', '03005556677', 'player_957@gamingarena.com', NULL),
(3, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-02 15:00:00', '2026-10-02 16:00:00', 2, NULL, 'paid', 2500.00, 'Court 1', '2026-10-01 12:00:00', '2026-10-02 11:00:00', 'Cash Register', 2500.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_422@gamingarena.com', NULL),
(4, 1, NULL, NULL, 2, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-19 20:00:00', '2026-09-19 21:00:00', 1, NULL, 'paid', 2500.00, 'Court 1', '2026-09-19 05:00:00', '2026-09-19 16:00:00', 'Stripe', 2500.00, 0.00, NULL, 'regular', 'Babar Azam', '03001112233', 'player_442@gamingarena.com', NULL),
(5, 1, NULL, NULL, 2, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-12 21:00:00', '2026-10-12 22:00:00', 7, NULL, 'paid', 3000.00, 'Court 3', '2026-10-11 19:00:00', '2026-10-12 17:00:00', 'Cash Register', 3000.00, 0.00, NULL, 'regular', 'Babar Azam', '03001112233', 'player_124@gamingarena.com', NULL),
(6, 1, NULL, NULL, 6, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-28 16:00:00', '2026-09-28 18:00:00', 5, NULL, 'paid', 3600.00, 'Court 1', '2026-09-28 08:00:00', '2026-09-28 13:00:00', 'Cash Register', 3600.00, 0.00, NULL, 'regular', 'Zayd Khan', '03005556677', 'player_598@gamingarena.com', NULL),
(7, 1, NULL, NULL, 1, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-20 20:00:00', '2026-09-20 21:00:00', 6, NULL, 'paid', 3000.00, 'Court 4', '2026-09-20 13:00:00', '2026-09-20 16:00:00', 'Stripe', 3000.00, 0.00, NULL, 'regular', 'Walk-in Guest', '0300-0000000', 'player_931@gamingarena.com', NULL),
(8, 1, NULL, NULL, 5, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 16:00:00', '2026-10-16 18:00:00', 4, NULL, 'paid', 3600.00, 'Court 1', '2026-10-16 04:00:00', '2026-10-16 13:00:00', 'Cash Register', 3600.00, 0.00, NULL, 'regular', 'Faris Ali', '03004445566', 'player_681@gamingarena.com', NULL),
(9, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-07 16:00:00', '2026-10-07 17:00:00', 10, NULL, 'paid', 1200.00, 'Court 4', '2026-10-06 15:00:00', '2026-10-07 12:00:00', 'Stripe', 1200.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_233@gamingarena.com', NULL),
(10, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-15 22:00:00', '2026-10-15 23:00:00', 2, NULL, 'paid', 2500.00, 'Court 3', '2026-10-15 12:00:00', '2026-10-15 18:00:00', 'EasyPaisa/JazzCash', 2500.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_112@gamingarena.com', NULL),
(11, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-27 19:00:00', '2026-09-27 21:00:00', 10, NULL, 'paid', 2400.00, 'Court 1', '2026-09-26 22:00:00', '2026-09-27 16:00:00', 'EasyPaisa/JazzCash', 2400.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_170@gamingarena.com', NULL),
(12, 1, NULL, NULL, 5, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-30 20:00:00', '2026-09-30 21:00:00', 10, NULL, 'paid', 1200.00, 'Court 4', '2026-09-30 13:00:00', '2026-09-30 16:00:00', 'Cash Register', 1200.00, 0.00, NULL, 'regular', 'Faris Ali', '03004445566', 'player_830@gamingarena.com', NULL),
(13, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-22 23:00:00', '2026-09-23 00:00:00', 6, NULL, 'paid', 3000.00, 'Court 4', '2026-09-22 04:00:00', '2026-09-22 19:00:00', 'PayFast (Debit/Credit)', 3000.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_839@gamingarena.com', NULL),
(14, 1, NULL, NULL, 6, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-20 23:00:00', '2026-09-21 00:00:00', 4, NULL, 'paid', 1800.00, 'Court 4', '2026-09-19 22:00:00', '2026-09-20 19:00:00', 'Cash Register', 1800.00, 0.00, NULL, 'regular', 'Zayd Khan', '03005556677', 'player_637@gamingarena.com', NULL),
(15, 1, NULL, NULL, 5, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-22 16:00:00', '2026-09-22 17:00:00', 9, NULL, 'paid', 4500.00, 'Court 2', '2026-09-22 01:00:00', '2026-09-22 12:00:00', 'Stripe', 4500.00, 0.00, NULL, 'regular', 'Faris Ali', '03004445566', 'player_511@gamingarena.com', NULL),
(16, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-10 23:00:00', '2026-10-11 00:00:00', 9, NULL, 'paid', 4500.00, 'Court 1', '2026-10-09 22:00:00', '2026-10-10 19:00:00', 'Cash Register', 4500.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_775@gamingarena.com', NULL),
(17, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-15 20:00:00', '2026-10-15 21:00:00', 4, NULL, 'paid', 1800.00, 'Court 3', '2026-10-15 07:00:00', '2026-10-15 16:00:00', 'Cash Register', 1800.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_101@gamingarena.com', NULL),
(18, 1, NULL, NULL, 5, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 15:00:00', '2026-10-17 16:00:00', 5, NULL, 'paid', 1800.00, 'Court 1', '2026-10-16 15:00:00', '2026-10-17 11:00:00', 'Cash Register', 1800.00, 0.00, NULL, 'regular', 'Faris Ali', '03004445566', 'player_281@gamingarena.com', NULL),
(19, 1, NULL, NULL, 5, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-19 17:00:00', '2026-09-19 18:00:00', 2, NULL, 'paid', 2500.00, 'Court 3', '2026-09-19 02:00:00', '2026-09-19 13:00:00', 'EasyPaisa/JazzCash', 2500.00, 0.00, NULL, 'regular', 'Faris Ali', '03004445566', 'player_273@gamingarena.com', NULL),
(20, 1, NULL, NULL, 5, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-14 20:00:00', '2026-10-14 21:00:00', 9, NULL, 'paid', 4500.00, 'Court 3', '2026-10-14 11:00:00', '2026-10-14 16:00:00', 'EasyPaisa/JazzCash', 4500.00, 0.00, NULL, 'regular', 'Faris Ali', '03004445566', 'player_248@gamingarena.com', NULL),
(21, 1, NULL, NULL, 7, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-05 19:00:00', '2026-10-05 21:00:00', 1, NULL, 'paid', 5000.00, 'Court 1', '2026-10-04 17:00:00', '2026-10-05 16:00:00', 'EasyPaisa/JazzCash', 5000.00, 0.00, NULL, 'regular', 'Hamza Tariq', '03006667788', 'player_461@gamingarena.com', NULL),
(22, 1, NULL, NULL, 6, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-24 20:00:00', '2026-09-24 22:00:00', 4, NULL, 'paid', 3600.00, 'Court 2', '2026-09-23 23:00:00', '2026-09-24 17:00:00', 'EasyPaisa/JazzCash', 3600.00, 0.00, NULL, 'regular', 'Zayd Khan', '03005556677', 'player_964@gamingarena.com', NULL),
(23, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-14 23:00:00', '2026-10-15 00:00:00', 1, NULL, 'paid', 2500.00, 'Court 3', '2026-10-14 13:00:00', '2026-10-14 19:00:00', 'PayFast (Debit/Credit)', 2500.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_267@gamingarena.com', NULL),
(24, 1, NULL, NULL, 4, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-02 16:00:00', '2026-10-02 17:00:00', 7, NULL, 'paid', 3000.00, 'Court 4', '2026-10-01 21:00:00', '2026-10-02 12:00:00', 'PayFast (Debit/Credit)', 3000.00, 0.00, NULL, 'regular', 'Mohammad Rizwan', '03003334455', 'player_825@gamingarena.com', NULL),
(25, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-20 19:00:00', '2026-09-20 21:00:00', 3, NULL, 'paid', 5000.00, 'Court 1', '2026-09-20 06:00:00', '2026-09-20 16:00:00', 'Stripe', 5000.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_963@gamingarena.com', NULL),
(26, 1, NULL, NULL, 1, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-08 22:00:00', '2026-10-08 23:00:00', 8, NULL, 'paid', 3000.00, 'Court 1', '2026-10-08 11:00:00', '2026-10-08 18:00:00', 'EasyPaisa/JazzCash', 3000.00, 0.00, NULL, 'regular', 'Walk-in Guest', '0300-0000000', 'player_830@gamingarena.com', NULL),
(27, 1, NULL, NULL, 5, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-05 21:00:00', '2026-10-05 23:00:00', 2, NULL, 'paid', 5000.00, 'Court 3', '2026-10-04 22:00:00', '2026-10-05 18:00:00', 'PayFast (Debit/Credit)', 5000.00, 0.00, NULL, 'regular', 'Faris Ali', '03004445566', 'player_357@gamingarena.com', NULL),
(28, 1, NULL, NULL, 1, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-24 22:00:00', '2026-09-24 23:00:00', 1, NULL, 'paid', 2500.00, 'Court 3', '2026-09-23 18:00:00', '2026-09-24 18:00:00', 'PayFast (Debit/Credit)', 2500.00, 0.00, NULL, 'regular', 'Walk-in Guest', '0300-0000000', 'player_464@gamingarena.com', NULL),
(29, 1, NULL, NULL, 4, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-29 21:00:00', '2026-09-29 22:00:00', 7, NULL, 'paid', 3000.00, 'Court 4', '2026-09-29 01:00:00', '2026-09-29 17:00:00', 'Stripe', 3000.00, 0.00, NULL, 'regular', 'Mohammad Rizwan', '03003334455', 'player_551@gamingarena.com', NULL),
(30, 1, NULL, NULL, 4, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-26 15:00:00', '2026-09-26 17:00:00', 9, NULL, 'paid', 9000.00, 'Court 3', '2026-09-25 13:00:00', '2026-09-26 12:00:00', 'Stripe', 9000.00, 0.00, NULL, 'regular', 'Mohammad Rizwan', '03003334455', 'player_416@gamingarena.com', NULL),
(31, 1, NULL, NULL, 6, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-25 16:00:00', '2026-09-25 17:00:00', 2, NULL, 'paid', 2500.00, 'Court 3', '2026-09-24 15:00:00', '2026-09-25 12:00:00', 'Stripe', 2500.00, 0.00, NULL, 'regular', 'Zayd Khan', '03005556677', 'player_587@gamingarena.com', NULL),
(32, 1, NULL, NULL, 7, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-11 19:00:00', '2026-10-11 21:00:00', 5, NULL, 'paid', 3600.00, 'Court 3', '2026-10-11 06:00:00', '2026-10-11 16:00:00', 'PayFast (Debit/Credit)', 3600.00, 0.00, NULL, 'regular', 'Hamza Tariq', '03006667788', 'player_820@gamingarena.com', NULL),
(33, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 17:00:00', '2026-10-17 19:00:00', 2, NULL, 'paid', 5000.00, 'Court 4', '2026-10-17 10:00:00', '2026-10-17 14:00:00', 'PayFast (Debit/Credit)', 5000.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_183@gamingarena.com', NULL),
(34, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-19 20:00:00', '2026-09-19 22:00:00', 8, NULL, 'paid', 6000.00, 'Court 3', '2026-09-19 09:00:00', '2026-09-19 17:00:00', 'PayFast (Debit/Credit)', 6000.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_493@gamingarena.com', NULL),
(35, 1, NULL, NULL, 6, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-10 19:00:00', '2026-10-10 21:00:00', 2, NULL, 'paid', 5000.00, 'Court 1', '2026-10-09 21:00:00', '2026-10-10 16:00:00', 'PayFast (Debit/Credit)', 5000.00, 0.00, NULL, 'regular', 'Zayd Khan', '03005556677', 'player_278@gamingarena.com', NULL),
(36, 1, NULL, NULL, 2, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-05 20:00:00', '2026-10-05 21:00:00', 6, NULL, 'paid', 3000.00, 'Court 2', '2026-10-05 11:00:00', '2026-10-05 16:00:00', 'PayFast (Debit/Credit)', 3000.00, 0.00, NULL, 'regular', 'Babar Azam', '03001112233', 'player_783@gamingarena.com', NULL),
(37, 1, NULL, NULL, 2, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-03 23:00:00', '2026-10-04 00:00:00', 4, NULL, 'paid', 1800.00, 'Court 1', '2026-10-03 16:00:00', '2026-10-03 19:00:00', 'Stripe', 1800.00, 0.00, NULL, 'regular', 'Babar Azam', '03001112233', 'player_714@gamingarena.com', NULL),
(38, 1, NULL, NULL, 6, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-23 16:00:00', '2026-09-23 18:00:00', 8, NULL, 'paid', 6000.00, 'Court 3', '2026-09-22 20:00:00', '2026-09-23 13:00:00', 'Stripe', 6000.00, 0.00, NULL, 'regular', 'Zayd Khan', '03005556677', 'player_645@gamingarena.com', NULL),
(39, 1, NULL, NULL, 2, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-29 17:00:00', '2026-09-29 18:00:00', 7, NULL, 'paid', 3000.00, 'Court 1', '2026-09-29 04:00:00', '2026-09-29 13:00:00', 'Stripe', 3000.00, 0.00, NULL, 'regular', 'Babar Azam', '03001112233', 'player_103@gamingarena.com', NULL),
(40, 1, NULL, NULL, 6, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 22:00:00', '2026-10-17 00:00:00', 2, NULL, 'paid', 5000.00, 'Court 1', '2026-10-16 14:00:00', '2026-10-16 19:00:00', 'Cash Register', 5000.00, 0.00, NULL, 'regular', 'Zayd Khan', '03005556677', 'player_901@gamingarena.com', NULL),
(41, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-12 16:00:00', '2026-10-12 18:00:00', 2, NULL, 'paid', 5000.00, 'Court 4', '2026-10-11 11:00:00', '2026-10-12 13:00:00', 'Stripe', 5000.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_421@gamingarena.com', NULL),
(42, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-15 17:00:00', '2026-10-15 18:00:00', 3, NULL, 'paid', 2500.00, 'Court 3', '2026-10-15 05:00:00', '2026-10-15 13:00:00', 'EasyPaisa/JazzCash', 2500.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_745@gamingarena.com', NULL),
(43, 1, NULL, NULL, 7, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 22:00:00', '2026-10-16 23:00:00', 10, NULL, 'paid', 1200.00, 'Court 1', '2026-10-16 06:00:00', '2026-10-16 18:00:00', 'EasyPaisa/JazzCash', 1200.00, 0.00, NULL, 'regular', 'Hamza Tariq', '03006667788', 'player_478@gamingarena.com', NULL),
(44, 1, NULL, NULL, 3, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-24 22:00:00', '2026-09-25 00:00:00', 3, NULL, 'paid', 5000.00, 'Court 3', '2026-09-24 12:00:00', '2026-09-24 19:00:00', 'EasyPaisa/JazzCash', 5000.00, 0.00, NULL, 'regular', 'Shaheen Afridi', '03002223344', 'player_710@gamingarena.com', NULL),
(45, 1, NULL, NULL, 7, NULL, NULL, 'completed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 20:00:00', '2026-10-17 22:00:00', 10, NULL, 'paid', 2400.00, 'Court 1', '2026-10-17 12:00:00', '2026-10-17 17:00:00', 'EasyPaisa/JazzCash', 2400.00, 0.00, NULL, 'regular', 'Hamza Tariq', '03006667788', 'player_473@gamingarena.com', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `campaigns`
--

CREATE TABLE `campaigns` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cashier_shifts`
--

CREATE TABLE `cashier_shifts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `cashier_name` varchar(255) DEFAULT NULL,
  `shift_date` varchar(255) DEFAULT NULL,
  `shift_type` varchar(255) DEFAULT NULL,
  `opened_at` datetime DEFAULT NULL,
  `closed_at` datetime DEFAULT NULL,
  `opening_balance` decimal(12,2) DEFAULT 0.00,
  `closing_balance` decimal(12,2) DEFAULT 0.00,
  `opening_notes` text DEFAULT NULL,
  `closing_notes` text DEFAULT NULL,
  `variance` decimal(12,2) DEFAULT 0.00,
  `variance_reason` varchar(255) DEFAULT NULL,
  `closing_card_amount` decimal(12,2) DEFAULT 0.00,
  `card_variance` decimal(12,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cashier_shifts`
--

INSERT INTO `cashier_shifts` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `cashier_name`, `shift_date`, `shift_type`, `opened_at`, `closed_at`, `opening_balance`, `closing_balance`, `opening_notes`, `closing_notes`, `variance`, `variance_reason`, `closing_card_amount`, `card_variance`) VALUES
(3, 1, NULL, NULL, NULL, NULL, NULL, 'closed', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 14:42:01', '2026-10-16 14:42:01', 'Bilal Ahmed (Cashier 1)', '2026-10-16', 'morning', '2026-10-16 09:00:00', '2026-10-16 17:00:00', 10000.00, 45000.00, 'Drawer float verified.', 'Evening handoff completed without variance.', 0.00, NULL, 0.00, 0.00),
(4, 1, NULL, NULL, NULL, NULL, NULL, 'open', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:42:01', '2026-10-17 12:42:01', 'Usman Tariq (Cashier 2)', '2026-10-17', 'evening', '2026-10-17 17:42:01', NULL, 15000.00, NULL, 'Evening peak hours shift active.', NULL, NULL, NULL, 0.00, 0.00);

-- --------------------------------------------------------

--
-- Table structure for table `cashier_shift_transactions`
--

CREATE TABLE `cashier_shift_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `cashier_shift_id` bigint(20) UNSIGNED NOT NULL,
  `transaction_type` varchar(255) NOT NULL DEFAULT 'cash_sale',
  `payment_method` varchar(255) NOT NULL DEFAULT 'cash',
  `amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `booking_id` bigint(20) UNSIGNED DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `recorded_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cashier_shift_transactions`
--

INSERT INTO `cashier_shift_transactions` (`id`, `tenant_id`, `cashier_shift_id`, `transaction_type`, `payment_method`, `amount`, `booking_id`, `notes`, `recorded_by`, `created_at`, `updated_at`) VALUES
(1, 1, 3, 'sale', 'cash', 1800.00, NULL, 'Padel Racket Grip & Overgrip Pack (TX-1000)', 1, '2026-10-11 09:23:00', '2026-10-11 09:23:00'),
(2, 1, 3, 'sale', 'card', 3200.00, NULL, 'Bullpadel Pro Ball Can (3 Balls) (TX-1001)', 1, '2026-10-12 12:33:00', '2026-10-12 12:33:00'),
(3, 1, 3, 'sale', 'cash', 2000.00, NULL, 'Electrolyte Hydration Drink x 4 (TX-1002)', 1, '2026-10-10 14:57:00', '2026-10-10 14:57:00'),
(4, 1, 3, 'sale', 'card', 4500.00, NULL, 'Gaming Arena Pro Dri-Fit Match Jersey (TX-1003)', 1, '2026-10-13 10:26:00', '2026-10-13 10:26:00'),
(5, 1, 3, 'sale', 'cash', 1200.00, NULL, 'Snooker Chalk & Cue Tip Service (TX-1004)', 1, '2026-10-08 13:34:00', '2026-10-08 13:34:00'),
(6, 1, 3, 'sale', 'cash', 1500.00, NULL, 'Cold Brew Coffee & Protein Bar (TX-1005)', 1, '2026-10-09 07:09:00', '2026-10-09 07:09:00');

-- --------------------------------------------------------

--
-- Table structure for table `cash_deposits`
--

CREATE TABLE `cash_deposits` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `cash_withdrawals`
--

CREATE TABLE `cash_withdrawals` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `chart_of_accounts`
--

CREATE TABLE `chart_of_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `category` varchar(255) DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `balance` decimal(14,2) NOT NULL DEFAULT 0.00,
  `parent_id` varchar(255) DEFAULT NULL,
  `classification` varchar(255) NOT NULL DEFAULT 'posting',
  `normal_balance` varchar(255) NOT NULL DEFAULT 'Debit'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `chart_of_accounts`
--

INSERT INTO `chart_of_accounts` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `code`, `category`, `active`, `balance`, `parent_id`, `classification`, `normal_balance`) VALUES
(1, 1, NULL, NULL, NULL, 'Assets', NULL, NULL, 'Asset', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '1000', NULL, 1, 8450000.00, NULL, 'group', 'Debit'),
(2, 1, NULL, NULL, NULL, 'Current Assets', NULL, NULL, 'Asset', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '1100', NULL, 1, 5250000.00, '1000', 'group', 'Debit'),
(3, 1, NULL, NULL, NULL, 'Cash & Cash Equivalents', NULL, NULL, 'Asset', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '1110', NULL, 1, 1250000.00, '1100', 'posting', 'Debit'),
(4, 1, NULL, NULL, NULL, 'Bank Accounts', NULL, NULL, 'Asset', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '1120', NULL, 1, 4000000.00, '1100', 'posting', 'Debit'),
(5, 1, NULL, NULL, NULL, 'Accounts Receivable', NULL, NULL, 'Asset', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '1130', NULL, 1, 0.00, '1100', 'posting', 'Debit'),
(6, 1, NULL, NULL, NULL, 'Fixed Assets', NULL, NULL, 'Asset', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '1200', NULL, 1, 3200000.00, '1000', 'group', 'Debit'),
(7, 1, NULL, NULL, NULL, 'Office & Court Equipment', NULL, NULL, 'Asset', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '1210', NULL, 1, 3200000.00, '1200', 'posting', 'Debit'),
(8, 1, NULL, NULL, NULL, 'Liabilities', NULL, NULL, 'Liability', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '2000', NULL, 1, 2150000.00, NULL, 'group', 'Credit'),
(9, 1, NULL, NULL, NULL, 'Accounts Payable (Vendors)', NULL, NULL, 'Liability', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '2100', NULL, 1, 850000.00, '2000', 'posting', 'Credit'),
(10, 1, NULL, NULL, NULL, 'Security Deposits Held', NULL, NULL, 'Liability', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '2200', NULL, 1, 1300000.00, '2000', 'posting', 'Credit'),
(11, 1, NULL, NULL, NULL, 'Equity', NULL, NULL, 'Equity', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '3000', NULL, 1, 4100000.00, NULL, 'group', 'Credit'),
(12, 1, NULL, NULL, NULL, 'Owner Capital', NULL, NULL, 'Equity', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '3100', NULL, 1, 3500000.00, '3000', 'posting', 'Credit'),
(13, 1, NULL, NULL, NULL, 'Retained Earnings', NULL, NULL, 'Equity', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '3200', NULL, 1, 600000.00, '3000', 'posting', 'Credit'),
(14, 1, NULL, NULL, NULL, 'Income / Revenue', NULL, NULL, 'Income', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '4000', NULL, 1, 6800000.00, NULL, 'group', 'Credit'),
(15, 1, NULL, NULL, NULL, 'Court & Facility Bookings', NULL, NULL, 'Income', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '4100', NULL, 1, 4500000.00, '4000', 'posting', 'Credit'),
(16, 1, NULL, NULL, NULL, 'POS & Pro-Shop Sales', NULL, NULL, 'Income', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '4200', NULL, 1, 1500000.00, '4000', 'posting', 'Credit'),
(17, 1, NULL, NULL, NULL, 'Tenant Lease & Revenue Share', NULL, NULL, 'Income', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '4300', NULL, 1, 800000.00, '4000', 'posting', 'Credit'),
(18, 1, NULL, NULL, NULL, 'Operating Expenses', NULL, NULL, 'Expense', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '5000', NULL, 1, 1800000.00, NULL, 'group', 'Debit'),
(19, 1, NULL, NULL, NULL, 'Staff Salaries & Wages', NULL, NULL, 'Expense', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '5100', NULL, 1, 1100000.00, '5000', 'posting', 'Debit'),
(20, 1, NULL, NULL, NULL, 'Utilities & Electricity', NULL, NULL, 'Expense', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '5200', NULL, 1, 500000.00, '5000', 'posting', 'Debit'),
(21, 1, NULL, NULL, NULL, 'Court & Facility Maintenance', NULL, NULL, 'Expense', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:19:20', '2026-10-17 12:19:20', '5300', NULL, 1, 200000.00, '5000', 'posting', 'Debit');

-- --------------------------------------------------------

--
-- Table structure for table `chat_threads`
--

CREATE TABLE `chat_threads` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `coaches`
--

CREATE TABLE `coaches` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `specialization` varchar(255) NOT NULL DEFAULT 'Padel & Tennis Pro',
  `hourly_rate` decimal(10,2) NOT NULL DEFAULT 5000.00,
  `bio` text DEFAULT NULL,
  `avatar` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `coaches`
--

INSERT INTO `coaches` (`id`, `tenant_id`, `name`, `email`, `phone`, `specialization`, `hourly_rate`, `bio`, `avatar`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 1, 'Coach Alex Ramirez', 'alex@gamingarena.pk', '+92 300 1234567', 'Certified Master Padel Coach (FIP)', 6500.00, '10+ years experience training junior champions and senior competitive padel players.', NULL, 1, '2026-10-17 06:18:43', '2026-10-17 06:18:43'),
(2, 1, 'Coach Sara Khan', 'sara@gamingarena.pk', '+92 321 7654321', 'Ladies & Youth Padel Development', 4500.00, 'Specializes in fundamental techniques, agility, and group fitness clinics.', NULL, 1, '2026-10-17 06:18:43', '2026-10-17 06:18:43');

-- --------------------------------------------------------

--
-- Table structure for table `coaching_sessions`
--

CREATE TABLE `coaching_sessions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `coach_id` bigint(20) UNSIGNED NOT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_name` varchar(255) NOT NULL,
  `customer_phone` varchar(255) DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `session_date` date NOT NULL,
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `session_type` varchar(255) NOT NULL DEFAULT '1-on-1 Private',
  `price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `payment_status` varchar(255) NOT NULL DEFAULT 'Unpaid',
  `payment_method` varchar(255) DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'Scheduled',
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `coach_private_lessons`
--

CREATE TABLE `coach_private_lessons` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `coach_id` bigint(20) UNSIGNED DEFAULT NULL,
  `coach_name` varchar(255) NOT NULL,
  `student_name` varchar(255) NOT NULL,
  `student_phone` varchar(255) NOT NULL,
  `sport` varchar(50) NOT NULL DEFAULT 'Padel Tennis',
  `lesson_type` varchar(50) NOT NULL DEFAULT '1-on-1 Private',
  `court_assigned` varchar(255) NOT NULL DEFAULT 'Court 1 (Panoramic Glass)',
  `session_start` datetime NOT NULL,
  `duration_minutes` int(11) NOT NULL DEFAULT 60,
  `total_fee` decimal(10,2) NOT NULL DEFAULT 6000.00,
  `coach_share_pct` decimal(5,2) NOT NULL DEFAULT 70.00,
  `club_share_amount` decimal(10,2) NOT NULL DEFAULT 1800.00,
  `coach_payout_amount` decimal(10,2) NOT NULL DEFAULT 4200.00,
  `payment_status` varchar(20) NOT NULL DEFAULT 'paid',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `coach_private_lessons`
--

INSERT INTO `coach_private_lessons` (`id`, `tenant_id`, `coach_id`, `coach_name`, `student_name`, `student_phone`, `sport`, `lesson_type`, `court_assigned`, `session_start`, `duration_minutes`, `total_fee`, `coach_share_pct`, `club_share_amount`, `coach_payout_amount`, `payment_status`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'Coach Irfan (Head Padel Pro)', 'Daniyal Ahmed', '+92 300 1234567', 'Padel Tennis', '1-on-1 Pro Masterclass', 'Court 1 (Panoramic Glass)', '2026-10-17 23:51:49', 60, 7000.00, 70.00, 2100.00, 4900.00, 'paid', '2026-10-17 16:51:49', '2026-10-17 16:51:49'),
(2, 1, NULL, 'Coach Maria (Spanish Certified)', 'Sara Farooq & Ayesha Malik', '+92 321 4455667', 'Padel Tennis', 'Semi-Private (2 Players)', 'Court 2 (Pro Turf)', '2026-10-18 17:51:49', 60, 9000.00, 65.00, 3150.00, 5850.00, 'paid', '2026-10-17 16:51:49', '2026-10-17 16:51:49');

-- --------------------------------------------------------

--
-- Table structure for table `community_posts`
--

CREATE TABLE `community_posts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `corporate_bookings`
--

CREATE TABLE `corporate_bookings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `corporate_client_id` int(11) DEFAULT 0,
  `event_name` varchar(255) DEFAULT NULL,
  `pax_count` int(11) DEFAULT 0,
  `per_head_rate` decimal(10,2) DEFAULT 0.00,
  `contract_ref` varchar(255) DEFAULT NULL,
  `cancellation_terms` text DEFAULT NULL,
  `internal_notes` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `corporate_clients`
--

CREATE TABLE `corporate_clients` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `contact_person` varchar(255) DEFAULT NULL,
  `contact_phone` varchar(255) DEFAULT NULL,
  `contact_email` varchar(255) DEFAULT NULL,
  `ntn_number` varchar(255) DEFAULT NULL,
  `credit_limit` decimal(12,2) DEFAULT 0.00,
  `current_balance` decimal(12,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `corporate_invoices`
--

CREATE TABLE `corporate_invoices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `corporate_payment_reminders`
--

CREATE TABLE `corporate_payment_reminders` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `client_name` varchar(255) NOT NULL,
  `contact_person` varchar(255) NOT NULL,
  `whatsapp_number` varchar(30) NOT NULL,
  `invoice_number` varchar(50) NOT NULL,
  `due_amount` decimal(12,2) NOT NULL,
  `due_date` date NOT NULL,
  `days_overdue` int(11) NOT NULL DEFAULT 0,
  `channel` varchar(20) NOT NULL DEFAULT 'WhatsApp',
  `reminder_stage` varchar(30) NOT NULL DEFAULT 'First Notice',
  `message_body` text NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'sent',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `corporate_payment_reminders`
--

INSERT INTO `corporate_payment_reminders` (`id`, `tenant_id`, `client_name`, `contact_person`, `whatsapp_number`, `invoice_number`, `due_amount`, `due_date`, `days_overdue`, `channel`, `reminder_stage`, `message_body`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Systems Limited', 'Kamran Ali (HR Director)', '+92 300 9876543', 'INV-CORP-2026-089', 145000.00, '2026-10-13', 4, 'WhatsApp', 'Urgent Notice', 'Dear Kamran Ali, reminder from Gaming Arena. Invoice #INV-CORP-2026-089 for PKR 145,000 is 4 days overdue. Please settle via 1Link/Raast to avoid corporate slot reservation suspension.', 'sent', '2026-10-17 12:13:37', '2026-10-17 12:13:37'),
(2, 1, 'Netsol Technologies', 'Fatima Sheikh (Admin Lead)', '+92 321 8765432', 'INV-CORP-2026-092', 85000.00, '2026-10-19', 0, 'WhatsApp', 'Gentle Reminder', 'Dear Fatima Sheikh, monthly lease payment for Netsol Arena passes (PKR 85,000) is due in 2 days on 19 Oct 2026. Direct transfer details enclosed.', 'scheduled', '2026-10-17 16:13:37', '2026-10-17 16:13:37');

-- --------------------------------------------------------

--
-- Table structure for table `court_energy_meters`
--

CREATE TABLE `court_energy_meters` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `court_name` varchar(255) NOT NULL,
  `kwh_consumed_today` decimal(8,2) NOT NULL DEFAULT 0.00,
  `kwh_saved_by_iot` decimal(8,2) NOT NULL DEFAULT 0.00,
  `co2_offset_kg` decimal(8,2) NOT NULL DEFAULT 0.00,
  `cost_savings_pkr` decimal(10,2) NOT NULL DEFAULT 0.00,
  `live_power_draw_kw` varchar(100) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `court_energy_meters`
--

INSERT INTO `court_energy_meters` (`id`, `tenant_id`, `court_name`, `kwh_consumed_today`, `kwh_saved_by_iot`, `co2_offset_kg`, `cost_savings_pkr`, `live_power_draw_kw`, `created_at`, `updated_at`) VALUES
(1, 1, 'Court 1 (Panoramic Glass)', 38.40, 22.80, 16.20, 1820.00, '4.2 kW (Active LED Floodlights)', '2026-10-17 16:34:13', '2026-10-17 16:34:13'),
(2, 1, 'Court 2 (Pro Turf)', 14.10, 31.60, 22.40, 2530.00, '0.0 kW (Standby Off)', '2026-10-17 16:34:13', '2026-10-17 16:34:13'),
(3, 1, 'Court 3 (Badminton Hall)', 26.50, 19.40, 13.80, 1550.00, '3.1 kW (HVAC & Lights Active)', '2026-10-17 16:34:13', '2026-10-17 16:34:13');

-- --------------------------------------------------------

--
-- Table structure for table `court_hourly_heatmaps`
--

CREATE TABLE `court_hourly_heatmaps` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `court_name` varchar(255) NOT NULL,
  `day_of_week` varchar(20) NOT NULL,
  `hour_of_day` int(11) NOT NULL,
  `occupancy_percentage` int(11) NOT NULL DEFAULT 0,
  `avg_hourly_revenue` decimal(10,2) NOT NULL DEFAULT 0.00,
  `demand_tier` varchar(20) NOT NULL DEFAULT 'Normal',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `court_hourly_heatmaps`
--

INSERT INTO `court_hourly_heatmaps` (`id`, `tenant_id`, `court_name`, `day_of_week`, `hour_of_day`, `occupancy_percentage`, `avg_hourly_revenue`, `demand_tier`, `created_at`, `updated_at`) VALUES
(1, 1, 'Court 1 (Panoramic Glass)', 'Saturday', 16, 47, 2115.00, 'Normal', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(2, 1, 'Court 1 (Panoramic Glass)', 'Saturday', 17, 70, 3150.00, 'High', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(3, 1, 'Court 1 (Panoramic Glass)', 'Saturday', 18, 59, 2655.00, 'Normal', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(4, 1, 'Court 1 (Panoramic Glass)', 'Saturday', 19, 96, 4320.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(5, 1, 'Court 1 (Panoramic Glass)', 'Saturday', 20, 97, 4365.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(6, 1, 'Court 1 (Panoramic Glass)', 'Saturday', 21, 96, 4320.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(7, 1, 'Court 1 (Panoramic Glass)', 'Saturday', 22, 98, 4410.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(8, 1, 'Court 1 (Panoramic Glass)', 'Saturday', 23, 69, 3105.00, 'High', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(9, 1, 'Court 2 (Pro Turf)', 'Saturday', 16, 56, 2520.00, 'Normal', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(10, 1, 'Court 2 (Pro Turf)', 'Saturday', 17, 51, 2295.00, 'Normal', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(11, 1, 'Court 2 (Pro Turf)', 'Saturday', 18, 61, 2745.00, 'High', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(12, 1, 'Court 2 (Pro Turf)', 'Saturday', 19, 95, 4275.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(13, 1, 'Court 2 (Pro Turf)', 'Saturday', 20, 100, 4500.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(14, 1, 'Court 2 (Pro Turf)', 'Saturday', 21, 98, 4410.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(15, 1, 'Court 2 (Pro Turf)', 'Saturday', 22, 95, 4275.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(16, 1, 'Court 2 (Pro Turf)', 'Saturday', 23, 47, 2115.00, 'Normal', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(17, 1, 'Court 3 (Show Court)', 'Saturday', 16, 59, 2655.00, 'Normal', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(18, 1, 'Court 3 (Show Court)', 'Saturday', 17, 60, 2700.00, 'High', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(19, 1, 'Court 3 (Show Court)', 'Saturday', 18, 64, 2880.00, 'High', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(20, 1, 'Court 3 (Show Court)', 'Saturday', 19, 100, 4500.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(21, 1, 'Court 3 (Show Court)', 'Saturday', 20, 89, 4005.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(22, 1, 'Court 3 (Show Court)', 'Saturday', 21, 90, 4050.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(23, 1, 'Court 3 (Show Court)', 'Saturday', 22, 97, 4365.00, 'Peak', '2026-10-17 17:13:37', '2026-10-17 17:13:37'),
(24, 1, 'Court 3 (Show Court)', 'Saturday', 23, 69, 3105.00, 'High', '2026-10-17 17:13:37', '2026-10-17 17:13:37');

-- --------------------------------------------------------

--
-- Table structure for table `court_iot_devices`
--

CREATE TABLE `court_iot_devices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `facility_id` bigint(20) UNSIGNED NOT NULL,
  `device_name` varchar(100) NOT NULL,
  `device_type` varchar(50) NOT NULL DEFAULT 'floodlight',
  `relay_ip` varchar(50) DEFAULT NULL,
  `relay_channel` int(11) NOT NULL DEFAULT 1,
  `current_status` varchar(20) NOT NULL DEFAULT 'off',
  `auto_trigger_enabled` tinyint(1) NOT NULL DEFAULT 1,
  `pre_booking_lead_minutes` int(11) NOT NULL DEFAULT 5,
  `post_booking_cutoff_minutes` int(11) NOT NULL DEFAULT 5,
  `last_ping_at` timestamp NULL DEFAULT NULL,
  `last_switched_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `court_iot_devices`
--

INSERT INTO `court_iot_devices` (`id`, `tenant_id`, `facility_id`, `device_name`, `device_type`, `relay_ip`, `relay_channel`, `current_status`, `auto_trigger_enabled`, `pre_booking_lead_minutes`, `post_booking_cutoff_minutes`, `last_ping_at`, `last_switched_at`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Court 1 Center Floodlights', 'floodlight', '192.168.10.101', 1, 'on', 1, 5, 5, '2026-10-17 16:15:32', '2026-10-17 16:15:32', '2026-10-17 16:15:32', '2026-10-17 16:15:32'),
(2, 1, 1, 'Court 1 Turnstile Access Gate', 'gate_turnstile', '192.168.10.102', 2, 'off', 1, 10, 0, '2026-10-17 16:15:32', '2026-10-17 16:15:32', '2026-10-17 16:15:32', '2026-10-17 16:15:32');

-- --------------------------------------------------------

--
-- Table structure for table `court_screens`
--

CREATE TABLE `court_screens` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `facility_id` bigint(20) UNSIGNED NOT NULL,
  `screen_name` varchar(255) NOT NULL,
  `screen_token` varchar(64) NOT NULL,
  `sport_type` varchar(255) NOT NULL DEFAULT 'cricket',
  `resolution` varchar(255) NOT NULL DEFAULT '1920x1080',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `last_ping_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `court_screens`
--

INSERT INTO `court_screens` (`id`, `tenant_id`, `facility_id`, `screen_name`, `screen_token`, `sport_type`, `resolution`, `is_active`, `last_ping_at`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Cricket Reborn (Melbourne Bay) — Main LED Screen', 'screen_1_610d876bec', 'cricket', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(2, 1, 2, 'Cricket Reborn (Sharjah Bay) — Main LED Screen', 'screen_2_95ef56d173', 'cricket', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(3, 1, 3, 'Cricket Reborn (Lord\'s Bay) — Main LED Screen', 'screen_3_ab6bedfbb7', 'cricket', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(4, 1, 4, 'CricketX VR Booth 1 — Main LED Screen', 'screen_4_5545a5868b', 'cricket', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(5, 1, 5, 'CricketX VR Booth 2 — Main LED Screen', 'screen_5_5863d7d9ad', 'cricket', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(6, 1, 6, 'Beat It Padel Court 1 — Main LED Screen', 'screen_6_37785e75fc', 'padel', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(7, 1, 7, 'Beat It Padel Court 2 — Main LED Screen', 'screen_7_cc2beebb45', 'padel', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(8, 1, 8, 'Beat It Padel Court 3 — Main LED Screen', 'screen_8_709066c2a1', 'padel', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(9, 1, 9, 'StrikeZone Turf (Futsal & Box Cricket) — Main LED Screen', 'screen_9_7b51c76b3d', 'futsal', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(10, 1, 10, 'CyberLounge Gaming Arena — Main LED Screen', 'screen_10_7040450c4a', 'futsal', '1920x1080', 1, NULL, '2026-10-17 12:28:33', '2026-10-17 12:28:33'),
(11, 1, 11, 'Royal Snooker Lounge — Table 1 Overhead LED', 'screen_11_eea0c85239', 'snooker', '1920x1080', 1, NULL, '2026-10-17 13:13:25', '2026-10-17 13:13:25');

-- --------------------------------------------------------

--
-- Table structure for table `court_video_replays`
--

CREATE TABLE `court_video_replays` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `booking_id` bigint(20) UNSIGNED DEFAULT NULL,
  `court_name` varchar(100) NOT NULL,
  `clip_title` varchar(255) NOT NULL,
  `camera_stream_url` varchar(255) DEFAULT NULL,
  `video_url` varchar(255) DEFAULT NULL,
  `thumbnail_url` varchar(255) DEFAULT NULL,
  `duration_seconds` int(11) NOT NULL DEFAULT 30,
  `tagged_players` varchar(255) DEFAULT NULL,
  `views_count` int(11) NOT NULL DEFAULT 0,
  `downloads_count` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `court_video_replays`
--

INSERT INTO `court_video_replays` (`id`, `tenant_id`, `booking_id`, `court_name`, `clip_title`, `camera_stream_url`, `video_url`, `thumbnail_url`, `duration_seconds`, `tagged_players`, `views_count`, `downloads_count`, `created_at`, `updated_at`) VALUES
(1, 1, 101, 'Court 1 (Panoramic Glass)', 'Insane Smash Rally (Point of the Day)', 'rtsp://192.168.1.200:554/cam1/h264', 'https://assets.mixkit.co/videos/preview/mixkit-tennis-player-bouncing-ball-with-racket-41271-large.mp4', 'https://images.unsplash.com/photo-1554068865-24cecd4e34b8?auto=format&fit=crop&w=600&q=80', 28, 'Farhan Qureshi, Ahmed Raza', 142, 38, '2026-10-17 13:33:29', '2026-10-17 13:33:29'),
(2, 1, 102, 'Court 2 (Pro Turf)', 'Winning Match Point Volley Drop', 'rtsp://192.168.1.201:554/cam2/h264', 'https://assets.mixkit.co/videos/preview/mixkit-tennis-player-serving-ball-41270-large.mp4', 'https://images.unsplash.com/photo-1622163642998-1ea32b0bbc67?auto=format&fit=crop&w=600&q=80', 35, 'Daniyal Ahmed, Usman Tariq', 89, 19, '2026-10-17 10:33:29', '2026-10-17 10:33:29');

-- --------------------------------------------------------

--
-- Table structure for table `cricket_session_stats`
--

CREATE TABLE `cricket_session_stats` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `system_type` varchar(255) NOT NULL,
  `booking_id` bigint(20) UNSIGNED DEFAULT NULL,
  `player_id` bigint(20) UNSIGNED DEFAULT NULL,
  `player_name` varchar(255) DEFAULT NULL,
  `overs_played` int(10) UNSIGNED NOT NULL DEFAULT 1,
  `runs_scored` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `balls_faced` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `strike_rate` decimal(6,2) NOT NULL DEFAULT 0.00,
  `fours` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `sixes` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `top_batting_speed_kmh` decimal(5,2) DEFAULT NULL,
  `avg_timing_score` decimal(5,2) DEFAULT NULL,
  `top_bowling_speed_kmh` decimal(5,2) DEFAULT NULL,
  `wickets_taken` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `shot_heatmap` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`shot_heatmap`)),
  `raw_payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`raw_payload`)),
  `session_completed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `membership_tier` varchar(255) DEFAULT NULL,
  `loyalty_points` int(11) DEFAULT 0,
  `wallet_balance` decimal(12,2) DEFAULT 0.00,
  `total_spent` decimal(12,2) DEFAULT 0.00,
  `loyalty_tier` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `membership_tier`, `loyalty_points`, `wallet_balance`, `total_spent`, `loyalty_tier`) VALUES
(1, 1, NULL, NULL, NULL, 'Walk-in Guest', NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'guest@gamingarena.com', '0300-0000000', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:00:29', '2026-10-17 12:00:29', 'Bronze', 0, 0.00, 0.00, NULL),
(2, 1, NULL, NULL, NULL, 'Babar Azam', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, '03001112233', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', 'Gold', 0, 2500.00, 0.00, NULL),
(3, 1, NULL, NULL, NULL, 'Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, '03002223344', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', 'Gold', 0, 2500.00, 0.00, NULL),
(4, 1, NULL, NULL, NULL, 'Mohammad Rizwan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, '03003334455', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', 'Gold', 0, 2500.00, 0.00, NULL),
(5, 1, NULL, NULL, NULL, 'Faris Ali', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, '03004445566', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', 'Gold', 0, 2500.00, 0.00, NULL),
(6, 1, NULL, NULL, NULL, 'Zayd Khan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, '03005556677', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', 'Gold', 0, 2500.00, 0.00, NULL),
(7, 1, NULL, NULL, NULL, 'Hamza Tariq', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, '03006667788', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', 'Gold', 0, 2500.00, 0.00, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `customer_spend_tiers`
--

CREATE TABLE `customer_spend_tiers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `name` varchar(255) NOT NULL,
  `min_spend` decimal(12,2) NOT NULL DEFAULT 0.00,
  `discount_percentage` int(11) NOT NULL DEFAULT 0,
  `badge_color` varchar(255) NOT NULL DEFAULT 'emerald',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customer_spend_tiers`
--

INSERT INTO `customer_spend_tiers` (`id`, `tenant_id`, `name`, `min_spend`, `discount_percentage`, `badge_color`, `created_at`, `updated_at`) VALUES
(1, 1, 'Bronze', 0.00, 0, 'slate', '2026-10-17 11:59:34', '2026-10-17 11:59:34'),
(2, 1, 'Silver', 25000.00, 5, 'blue', '2026-10-17 11:59:34', '2026-10-17 11:59:34'),
(3, 1, 'Gold', 60000.00, 10, 'amber', '2026-10-17 11:59:34', '2026-10-17 11:59:34'),
(4, 1, 'Platinum VIP', 120000.00, 15, 'purple', '2026-10-17 11:59:34', '2026-10-17 11:59:34');

-- --------------------------------------------------------

--
-- Table structure for table `daily_executive_digests`
--

CREATE TABLE `daily_executive_digests` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `recipient_title` varchar(255) NOT NULL DEFAULT 'Club Owner / CEO',
  `recipient_whatsapp` varchar(30) NOT NULL DEFAULT '+92 300 8472910',
  `digest_date` date NOT NULL,
  `total_revenue` decimal(12,2) NOT NULL DEFAULT 0.00,
  `court_occupancy_pct` decimal(5,2) NOT NULL DEFAULT 0.00,
  `total_bookings_count` int(11) NOT NULL DEFAULT 0,
  `cafe_sales` decimal(10,2) NOT NULL DEFAULT 0.00,
  `net_profit_est` decimal(10,2) NOT NULL DEFAULT 0.00,
  `summary_message` text NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'dispatched',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `daily_executive_digests`
--

INSERT INTO `daily_executive_digests` (`id`, `tenant_id`, `recipient_title`, `recipient_whatsapp`, `digest_date`, `total_revenue`, `court_occupancy_pct`, `total_bookings_count`, `cafe_sales`, `net_profit_est`, `summary_message`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Chief Executive Officer (CEO)', '+92 300 8472910', '2026-10-17', 184500.00, 88.50, 32, 38400.00, 124000.00, '📊 *Gaming Arena Daily Executive Digest*\n📅 Date: 17 Oct 2026\n💰 Total Revenue: Rs. 184,500\n🎾 Court Occupancy: 88.5% (32 Matches)\n☕ Café & Refreshments: Rs. 38,400\n📈 Est Net Profit: Rs. 124,000\n⚡ IoT Saved: 34.2 kWh (Rs. 2,750)\n\n_Generated automatically at closing shift._', 'dispatched', '2026-10-17 16:51:49', '2026-10-17 16:51:49');

-- --------------------------------------------------------

--
-- Table structure for table `digital_nfc_wallet_passes`
--

CREATE TABLE `digital_nfc_wallet_passes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `pass_serial_number` varchar(64) NOT NULL,
  `player_name` varchar(255) NOT NULL,
  `wallet_type` varchar(30) NOT NULL DEFAULT 'Apple Wallet',
  `stored_balance_pkr` decimal(10,2) NOT NULL DEFAULT 5000.00,
  `nfc_uid` varchar(50) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `digital_nfc_wallet_passes`
--

INSERT INTO `digital_nfc_wallet_passes` (`id`, `tenant_id`, `customer_id`, `pass_serial_number`, `player_name`, `wallet_type`, `stored_balance_pkr`, `nfc_uid`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'PASS-NFC-882910', 'Farhan Qureshi', 'Apple Wallet NFC', 12500.00, '04:A2:3B:58:91:C2:80', 'active', '2026-10-17 16:46:26', '2026-10-17 16:46:26'),
(2, 1, 2, 'PASS-NFC-774411', 'Ahmed Raza', 'Google Wallet NFC', 8400.00, '04:E1:9C:22:84:77:90', 'active', '2026-10-17 16:46:26', '2026-10-17 16:46:26');

-- --------------------------------------------------------

--
-- Table structure for table `discount_campaigns`
--

CREATE TABLE `discount_campaigns` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `name` varchar(255) NOT NULL,
  `code` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL DEFAULT 'percentage',
  `value` decimal(10,2) NOT NULL DEFAULT 10.00,
  `min_spend` decimal(10,2) NOT NULL DEFAULT 0.00,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `usage_limit` int(10) UNSIGNED NOT NULL DEFAULT 100,
  `used_count` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `total_discounted` decimal(10,2) NOT NULL DEFAULT 0.00,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `discount_campaigns`
--

INSERT INTO `discount_campaigns` (`id`, `tenant_id`, `name`, `code`, `type`, `value`, `min_spend`, `start_date`, `end_date`, `usage_limit`, `used_count`, `total_discounted`, `active`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'Ramadan Night Padel Special', 'RAMADAN20', 'percentage', 20.00, 3000.00, '2026-10-17', '2026-11-16', 200, 14, 11200.00, 1, '2026-10-17 06:19:23', '2026-10-17 06:19:23', NULL),
(2, 1, 'Corporate Executive Welcome Off', 'EXEC1000', 'fixed', 1000.00, 5000.00, '2026-10-17', '2026-12-16', 50, 5, 5000.00, 1, '2026-10-17 06:19:23', '2026-10-17 06:19:23', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `employees`
--

INSERT INTO `employees` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, NULL, NULL, 'Muhammad Ali', 'Head Padel Coach & Arena Operations', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'ali.arena@gamingarena.pk', '03001234567', 75000.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 15:53:10', '2026-10-17 15:53:10'),
(2, 1, NULL, NULL, NULL, 'Sara Khan', 'Frontdesk Cashier & Customer Experience Lead', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'sara.frontdesk@gamingarena.pk', '03129876543', 50000.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 15:53:10', '2026-10-17 15:53:10'),
(3, 1, NULL, NULL, NULL, 'Usman Tariq', 'Turf & Court Maintenance Supervisor', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'usman.tech@gamingarena.pk', '03335558899', 60000.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 15:53:10', '2026-10-17 15:53:10');

-- --------------------------------------------------------

--
-- Table structure for table `entry_players`
--

CREATE TABLE `entry_players` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `entry_id` bigint(20) UNSIGNED NOT NULL,
  `player_id` bigint(20) UNSIGNED NOT NULL,
  `role` varchar(255) NOT NULL DEFAULT 'player',
  `jersey_number` varchar(255) DEFAULT NULL,
  `is_verified` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `equipment`
--

CREATE TABLE `equipment` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `equipment_wear_trackers`
--

CREATE TABLE `equipment_wear_trackers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `item_name` varchar(150) NOT NULL,
  `category` varchar(50) NOT NULL DEFAULT 'Match Balls',
  `court_location` varchar(100) NOT NULL DEFAULT 'Court 1 (Panoramic Glass)',
  `total_hours_played` int(11) NOT NULL DEFAULT 0,
  `recommended_lifespan_hours` int(11) NOT NULL DEFAULT 30,
  `wear_percentage` decimal(5,2) NOT NULL DEFAULT 0.00,
  `health_status` varchar(30) NOT NULL DEFAULT 'Optimal',
  `last_replaced_date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `equipment_wear_trackers`
--

INSERT INTO `equipment_wear_trackers` (`id`, `tenant_id`, `item_name`, `category`, `court_location`, `total_hours_played`, `recommended_lifespan_hours`, `wear_percentage`, `health_status`, `last_replaced_date`, `created_at`, `updated_at`) VALUES
(1, 1, 'Head Padel Pro S (Official Match Box 24)', 'Match Balls', 'Court 1 (Panoramic Glass)', 28, 30, 93.33, 'Service Due', '2026-10-11', '2026-10-17 17:23:36', '2026-10-17 17:23:36'),
(2, 1, 'Bullpadel Hack 03 (Club Rental Racket #04)', 'Rental Rackets', 'Front Desk Pro-Shop', 140, 150, 93.33, 'Service Due', '2026-08-17', '2026-10-17 17:23:36', '2026-10-17 17:23:36'),
(3, 1, 'Mondo Supercourt XN (Italian Turf Fibers)', 'Court Turf', 'Court 2 (Pro Turf)', 840, 2500, 33.60, 'Optimal', '2026-04-17', '2026-10-17 17:23:36', '2026-10-17 17:23:36'),
(4, 1, 'Philips Lumileds 800W Pro Arena Floodlight Bank', 'LED Floodlights', 'Court 3 (Show Court)', 3100, 50000, 6.20, 'Optimal', '2025-10-17', '2026-10-17 17:23:36', '2026-10-17 17:23:36');

-- --------------------------------------------------------

--
-- Table structure for table `esports_squads`
--

CREATE TABLE `esports_squads` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `squad_name` varchar(255) NOT NULL,
  `squad_tag` varchar(6) NOT NULL,
  `logo_url` varchar(255) DEFAULT NULL,
  `captain_id` bigint(20) UNSIGNED DEFAULT NULL,
  `captain_name` varchar(255) NOT NULL DEFAULT 'Lead Striker',
  `members_count` int(11) NOT NULL DEFAULT 4,
  `squad_mmr` int(11) NOT NULL DEFAULT 1200,
  `tournaments_won` int(11) NOT NULL DEFAULT 0,
  `clan_war_wins` int(11) NOT NULL DEFAULT 0,
  `clan_war_losses` int(11) NOT NULL DEFAULT 0,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `esports_squads`
--

INSERT INTO `esports_squads` (`id`, `tenant_id`, `squad_name`, `squad_tag`, `logo_url`, `captain_id`, `captain_name`, `members_count`, `squad_mmr`, `tournaments_won`, `clan_war_wins`, `clan_war_losses`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Lahore Neon Vipers', 'LNV', '🐍', NULL, 'CYBER_VIPER_99', 6, 2480, 4, 28, 6, 'active', '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(2, 1, 'Islamabad Cyber Wolves', 'ICW', '🐺', NULL, 'PHANTOM_STRIKER', 6, 2650, 7, 35, 4, 'active', '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(3, 1, 'Karachi Thunder Kings', 'KTK', '⚡', NULL, 'VALKYRIE_BLADE', 5, 2190, 2, 19, 11, 'active', '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(4, 1, 'Apex Syndicate Padel', 'ASP', '👑', NULL, 'TITAN_SHADOW', 4, 1940, 1, 14, 12, 'active', '2026-10-17 17:47:05', '2026-10-17 17:47:05');

-- --------------------------------------------------------

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `category_id` int(11) DEFAULT 0,
  `category` varchar(255) DEFAULT NULL,
  `expense_date` date DEFAULT NULL,
  `payment_method` varchar(255) DEFAULT NULL,
  `bank_account_id` int(11) DEFAULT 0,
  `notes` text DEFAULT NULL,
  `receipt_url` varchar(255) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `expenses`
--

INSERT INTO `expenses` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `category_id`, `category`, `expense_date`, `payment_method`, `bank_account_id`, `notes`, `receipt_url`, `title`) VALUES
(7, 1, NULL, NULL, NULL, NULL, 'Diesel refuel for 100kVA Arena Backup Generator during peak matches', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, '2026-10-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 58000.00, NULL, '2026-10-15 14:42:01', '2026-10-15 14:42:01', 0, 'Utilities & Fuel', NULL, 'cash', 0, NULL, NULL, 'Generator Backup Diesel (200 Litres)'),
(8, 1, NULL, NULL, NULL, NULL, 'Specialized anti-smudge cleaning kit for Court 1 & 2 panoramic glass', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, '2026-10-16', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 12500.00, NULL, '2026-10-16 14:42:01', '2026-10-16 14:42:01', 0, 'Court Maintenance', NULL, 'bank', 0, NULL, NULL, 'Padel Court Glass Cleaner & Maintenance Chemical'),
(9, 1, NULL, NULL, NULL, NULL, 'StormFiber 100Mbps dedicated connection for scoring broadcast TV & POS', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, '2026-10-17', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 18000.00, NULL, '2026-10-17 14:42:01', '2026-10-17 14:42:01', 0, 'Internet & Tech', NULL, 'online', 0, NULL, NULL, 'High-Speed Fibre Internet Dedicated Leased Line'),
(10, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, '2026-10-02', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 145000.00, NULL, '2026-10-02 18:30:02', '2026-10-02 18:30:02', 0, 'Arena Staff Payroll', NULL, NULL, 0, 'Bi-weekly front desk and ground staff wages', NULL, NULL),
(11, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, '2026-10-09', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 24000.00, NULL, '2026-10-09 18:30:02', '2026-10-09 18:30:02', 0, 'Arena Sound & Lighting Cues', NULL, NULL, 0, 'DMX lighting cables & sound FX board calibration', NULL, NULL),
(12, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, '2026-10-11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 35000.00, NULL, '2026-10-11 18:30:02', '2026-10-11 18:30:02', 0, 'Marketing & Tournament Ad Spend', NULL, NULL, 0, 'Meta & Instagram sponsor campaigns for Padel Grand Prix', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `expense_categories`
--

CREATE TABLE `expense_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `facilities`
--

CREATE TABLE `facilities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `game_rules` text DEFAULT NULL,
  `tournaments_summary` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `pricing_model` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `facilities`
--

INSERT INTO `facilities` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `game_rules`, `tournaments_summary`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `pricing_model`) VALUES
(1, 1, NULL, NULL, NULL, 'Cricket Reborn (Melbourne Bay)', 'Olympic standard auto-bowling net cage with high-speed video analysis.', '• Format: 6-Over Box / Net Cricket or Rebon VR.\n• Batting: 8 runs for straight top net, 4/6 boundaries on marked side boards.\n• Dismissals: Direct catch off side nets is out. No LBWs.\n• Bowling: Maximum 2 overs per bowler, chucking strictly disallowed.', '• Gaming Arena Super Sixes Night Trophy (16 Teams Tape-ball)\n• Corporate Cricket Super Over League\n• National VR Batting Championship (Prize Pool: PKR 100,000)', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'cricket', 1, 2500.00, 3200.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_hour'),
(2, 1, NULL, NULL, NULL, 'Cricket Reborn (Sharjah Bay)', 'Fast pace and swing bowling simulator net.', '• Format: 6-Over Box / Net Cricket or Rebon VR.\n• Batting: 8 runs for straight top net, 4/6 boundaries on marked side boards.\n• Dismissals: Direct catch off side nets is out. No LBWs.\n• Bowling: Maximum 2 overs per bowler, chucking strictly disallowed.', '• Gaming Arena Super Sixes Night Trophy (16 Teams Tape-ball)\n• Corporate Cricket Super Over League\n• National VR Batting Championship (Prize Pool: PKR 100,000)', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'cricket', 1, 2500.00, 3200.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_hour'),
(3, 1, NULL, NULL, NULL, 'Cricket Reborn (Lord\'s Bay)', 'Spin bowling master simulator net with pro speed radar.', '• Format: 6-Over Box / Net Cricket or Rebon VR.\n• Batting: 8 runs for straight top net, 4/6 boundaries on marked side boards.\n• Dismissals: Direct catch off side nets is out. No LBWs.\n• Bowling: Maximum 2 overs per bowler, chucking strictly disallowed.', '• Gaming Arena Super Sixes Night Trophy (16 Teams Tape-ball)\n• Corporate Cricket Super Over League\n• National VR Batting Championship (Prize Pool: PKR 100,000)', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'cricket', 1, 2500.00, 3200.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_hour'),
(4, 1, NULL, NULL, NULL, 'CricketX VR Booth 1', 'Next-gen virtual reality cricket stadium experience with realistic haptic bat.', '• Format: 3 Overs per game round (VR Sensor Batting).\n• Difficulty Tiers: Club, County, International (145 km/h fast bowling).\n• VR Headset & Motion Sensors calibrated automatically before entry.', '• VR World Cup Blitz (Individual Leaderboard)\n• Fastest Century VR Challenge', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'vr', 1, 1800.00, 2400.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_game'),
(5, 1, NULL, NULL, NULL, 'CricketX VR Booth 2', 'VR cricket batting arena with 360 degree crowd immersion.', '• Format: 3 Overs per game round (VR Sensor Batting).\n• Difficulty Tiers: Club, County, International (145 km/h fast bowling).\n• VR Headset & Motion Sensors calibrated automatically before entry.', '• VR World Cup Blitz (Individual Leaderboard)\n• Fastest Century VR Challenge', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'vr', 1, 1800.00, 2400.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_game'),
(6, 1, NULL, NULL, NULL, 'Beat It Padel Court 1', 'Panoramic glass championship padel court with Mondo Supercourt turf.', '• Format: Best of 3 sets with tie-break at 6-6.\n• Serving: Underhand serve bouncing behind service line diagonally into receiver box.\n• Walls: Ball must bounce on turf before striking glass walls or wire mesh fences.\n• Scoring: 15-30-40-Game (Golden point on 40-40 deuce).', '• Red Bull Padel Championship (Annual Grand Slam - 32 Teams)\n• Lahore Padel Premier League (Weekly Clan Wars)\n• Mixed Doubles Invitational Knockout (Prize Pool: PKR 250,000)', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'padel', 1, 3000.00, 4000.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_hour'),
(7, 1, NULL, NULL, NULL, 'Beat It Padel Court 2', 'Championship glass padel court with tournament floodlighting.', '• Format: Best of 3 sets with tie-break at 6-6.\n• Serving: Underhand serve bouncing behind service line diagonally into receiver box.\n• Walls: Ball must bounce on turf before striking glass walls or wire mesh fences.\n• Scoring: 15-30-40-Game (Golden point on 40-40 deuce).', '• Red Bull Padel Championship (Annual Grand Slam - 32 Teams)\n• Lahore Padel Premier League (Weekly Clan Wars)\n• Mixed Doubles Invitational Knockout (Prize Pool: PKR 250,000)', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'padel', 1, 3000.00, 4000.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_hour'),
(8, 1, NULL, NULL, NULL, 'Beat It Padel Court 3', 'Center court padel arena with spectator seating.', '• Format: Best of 3 sets with tie-break at 6-6.\n• Serving: Underhand serve bouncing behind service line diagonally into receiver box.\n• Walls: Ball must bounce on turf before striking glass walls or wire mesh fences.\n• Scoring: 15-30-40-Game (Golden point on 40-40 deuce).', '• Red Bull Padel Championship (Annual Grand Slam - 32 Teams)\n• Lahore Padel Premier League (Weekly Clan Wars)\n• Mixed Doubles Invitational Knockout (Prize Pool: PKR 250,000)', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'padel', 1, 3000.00, 4000.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_hour'),
(9, 1, NULL, NULL, NULL, 'StrikeZone Turf (Futsal & Box Cricket)', 'FIFA-grade shock-absorption synthetic turf for 5v5 futsal & box cricket.', '• Format: 5 vs 5 (4 outfield players + 1 goalkeeper).\n• Duration: Two 20-minute halves.\n• Fouls: 5 cumulative team fouls result in a direct 10-meter penalty.', '• Midnight Futsal Cup (32 Corporate Squads)\n• Golden Boot Box Futsal Arena Trophy', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'futsal', 1, 4500.00, 6000.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_hour'),
(10, 1, NULL, NULL, NULL, 'CyberLounge Gaming Arena', 'PS5 4K consoles & RTX 4090 esports battle stations.', '• Hardware: RTX 4080 Super, 240Hz OLED Displays.\n• Logins: Steam, Riot Games, and EA Play loaded with tournament accounts.\n• Strict anti-cheat hardware lockdown.', '• CS2 & Valorant 5v5 Arena LAN Masters\n• EA FC 25 1v1 Midnight Showdown', 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'pc_gaming', 1, 1200.00, 1600.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 18:07:57', 'per_minute'),
(11, 1, NULL, NULL, NULL, 'Royal Snooker Lounge (Table 1 - Riley Aristocrat)', NULL, '• Format: Standard 15-Red WPBSA Rules.\n• Table: Riley Aristocrat Tournament 12ft Heated Slate.\n• Foul & A Miss: Max 3 misses penalty when snookered.\n• Break Trophy: Highest break prize awarded monthly (>75 break).', '• All-Pakistan Open Snooker Masters (Best of 7 Frames)\n• Gaming Arena 147 Break Challenge Trophy', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'snooker', 1, 800.00, 1200.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 13:13:25', '2026-10-17 18:07:57', 'per_frame');

-- --------------------------------------------------------

--
-- Table structure for table `facility_floor_nodes`
--

CREATE TABLE `facility_floor_nodes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `node_name` varchar(100) NOT NULL,
  `node_type` varchar(50) NOT NULL DEFAULT 'court',
  `pos_x` int(11) NOT NULL DEFAULT 100,
  `pos_y` int(11) NOT NULL DEFAULT 100,
  `width` int(11) NOT NULL DEFAULT 120,
  `height` int(11) NOT NULL DEFAULT 80,
  `status` varchar(30) NOT NULL DEFAULT 'available',
  `color_code` varchar(20) NOT NULL DEFAULT '#10b981',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `facility_floor_nodes`
--

INSERT INTO `facility_floor_nodes` (`id`, `tenant_id`, `facility_id`, `node_name`, `node_type`, `pos_x`, `pos_y`, `width`, `height`, `status`, `color_code`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Court 1 (Panoramic Glass)', 'court', 50, 60, 200, 130, 'occupied', '#ef4444', '2026-10-17 16:28:23', '2026-10-17 16:28:23'),
(2, 1, 2, 'Court 2 (Pro Turf)', 'court', 280, 60, 200, 130, 'available', '#10b981', '2026-10-17 16:28:23', '2026-10-17 16:28:23'),
(3, 1, NULL, 'Gaming Arena Lounge & Café', 'cafe', 510, 60, 160, 130, 'available', '#06b6d4', '2026-10-17 16:28:23', '2026-10-17 16:28:23'),
(4, 1, NULL, 'Reception & Pro-Shop', 'reception', 50, 220, 180, 90, 'available', '#8b5cf6', '2026-10-17 16:28:23', '2026-10-17 16:28:23'),
(5, 1, 3, 'Court 3 (Badminton Hall)', 'court', 280, 220, 200, 110, 'available', '#10b981', '2026-10-17 16:28:23', '2026-10-17 16:28:23');

-- --------------------------------------------------------

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `financial_budgets`
--

CREATE TABLE `financial_budgets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `fiscal_year` int(11) NOT NULL,
  `fiscal_month` int(11) NOT NULL,
  `department` varchar(100) NOT NULL,
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `budget_type` varchar(20) NOT NULL DEFAULT 'expense',
  `target_amount` decimal(15,2) NOT NULL DEFAULT 0.00,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `fixed_assets`
--

CREATE TABLE `fixed_assets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `asset_code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `category` varchar(255) NOT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `location` varchar(255) DEFAULT NULL,
  `purchase_cost` decimal(12,2) NOT NULL DEFAULT 0.00,
  `purchase_date` date DEFAULT NULL,
  `useful_life_years` int(11) NOT NULL DEFAULT 5,
  `salvage_value` decimal(12,2) NOT NULL DEFAULT 0.00,
  `depreciation_method` varchar(255) NOT NULL DEFAULT 'straight_line',
  `accumulated_depreciation` decimal(12,2) NOT NULL DEFAULT 0.00,
  `current_book_value` decimal(12,2) NOT NULL DEFAULT 0.00,
  `status` varchar(255) NOT NULL DEFAULT 'operational',
  `serial_number` varchar(255) DEFAULT NULL,
  `vendor_name` varchar(255) DEFAULT NULL,
  `warranty_expiry` date DEFAULT NULL,
  `last_serviced_at` date DEFAULT NULL,
  `next_service_due` date DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fixed_assets`
--

INSERT INTO `fixed_assets` (`id`, `tenant_id`, `asset_code`, `name`, `category`, `facility_id`, `location`, `purchase_cost`, `purchase_date`, `useful_life_years`, `salvage_value`, `depreciation_method`, `accumulated_depreciation`, `current_book_value`, `status`, `serial_number`, `vendor_name`, `warranty_expiry`, `last_serviced_at`, `next_service_due`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 'AST-PADEL-TURF-01', 'Mondo Supercourt XN Panoramic Glass Padel Court 1', 'court_hardware', 6, 'Main Arena Ground Level', 4500000.00, '2024-01-15', 8, 500000.00, 'straight_line', 1125000.00, 3375000.00, 'operational', 'MND-2024-PK-9812', 'Mondo Sports Flooring Iberia', '2029-01-15', '2026-08-10', '2026-11-10', 'Inspected by International Padel Federation technical delegate.', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(2, 1, 'AST-CRIC-SIM-01', 'RoboArm Automated Cricket Bowling Simulator Pro 3000', 'court_hardware', 1, 'Melbourne Cricket Bay', 2800000.00, '2024-03-20', 5, 300000.00, 'straight_line', 1250000.00, 1550000.00, 'operational', 'RBA-SIM-2024-098', 'Leverages Sports Tech India', '2027-03-20', '2026-09-01', '2026-12-01', '160km/h radar-calibrated speed motor replaced under warranty.', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(3, 1, 'AST-LED-FLOOD-01', 'Philips ArenaVision High-Output 800-Lux Floodlight Array (x16)', 'hvac_lights', 9, 'StrikeZone Futsal & Cricket Turf', 1950000.00, '2024-05-10', 10, 150000.00, 'straight_line', 405000.00, 1545000.00, 'operational', 'PHL-AV-800LX-911', 'Signify Luminaires Pakistan', '2029-05-10', '2026-07-15', '2026-10-25', 'Zero-flicker broadcast standard for 4K video match replays.', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(4, 1, 'AST-SNK-TABLE-01', 'Riley Aristocrat Tournament Slate Snooker Table (Steel Block Cushion)', 'sports_equipment', 11, 'Royal Snooker Lounge', 1400000.00, '2023-11-05', 15, 200000.00, 'straight_line', 240000.00, 1160000.00, 'operational', 'RLY-ARISTO-UK-882', 'E.J. Riley Snooker England', '2033-11-05', '2026-06-12', '2026-11-15', 'Strachan No. 10 Championship Gold cloth re-stretched.', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(5, 1, 'AST-GATE-FACE-01', 'ZKTeco SpeedFace-V5L AI Face Biometric Optical Turnstile Gate', 'IT_turnstiles', NULL, 'Main Reception Entrance Gate', 850000.00, '2024-02-01', 6, 50000.00, 'straight_line', 333333.33, 516666.67, 'operational', 'ZKT-SPF-2024-871', 'ZKTeco International Security', '2027-02-01', '2026-08-25', '2026-11-25', 'Integrated with Gaming Arena biometric access logs and member NFC tags.', '2026-10-17 19:35:19', '2026-10-17 19:35:19'),
(6, 1, 'AST-VR-RIG-01', 'Meta Quest Pro 3 512GB Haptic Cricket Simulator Rig (x2)', 'IT_turnstiles', 4, 'CricketX VR Booth 1', 650000.00, '2024-06-15', 3, 50000.00, 'straight_line', 450000.00, 200000.00, 'operational', 'MQ3-HPTC-99124', 'VR Dynamics UK', '2026-06-15', '2026-09-10', '2026-10-30', 'Includes wireless tracking sensors and custom weighted haptic bats.', '2026-10-17 19:35:19', '2026-10-17 19:35:19');

-- --------------------------------------------------------

--
-- Table structure for table `franchise_clubs`
--

CREATE TABLE `franchise_clubs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `club_name` varchar(255) NOT NULL,
  `city` varchar(255) NOT NULL,
  `country` varchar(255) NOT NULL DEFAULT 'Pakistan',
  `manager_name` varchar(255) NOT NULL,
  `contact_phone` varchar(255) NOT NULL,
  `total_courts` int(11) NOT NULL DEFAULT 4,
  `monthly_revenue` decimal(12,2) NOT NULL DEFAULT 0.00,
  `status` varchar(20) NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `franchise_clubs`
--

INSERT INTO `franchise_clubs` (`id`, `club_name`, `city`, `country`, `manager_name`, `contact_phone`, `total_courts`, `monthly_revenue`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Gaming Arena Flagship Club (Gulberg III)', 'Lahore', 'Pakistan', 'Kamran Shafi', '+92 300 8472910', 6, 4250000.00, 'active', '2026-10-17 16:33:29', '2026-10-17 16:33:29'),
(2, 'Gaming Arena Capital Padel (F-7 Markaz)', 'Islamabad', 'Pakistan', 'Zubair Chaudhry', '+92 321 5566778', 4, 3100000.00, 'active', '2026-10-17 16:33:29', '2026-10-17 16:33:29'),
(3, 'Gaming Arena SeaView Arena (DHA Phase VIII)', 'Karachi', 'Pakistan', 'Taimur Mirza', '+92 333 9988776', 8, 6400000.00, 'active', '2026-10-17 16:33:29', '2026-10-17 16:33:29');

-- --------------------------------------------------------

--
-- Table structure for table `gamer_profiles`
--

CREATE TABLE `gamer_profiles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `gamer_tag` varchar(255) NOT NULL,
  `avatar_style` varchar(255) NOT NULL DEFAULT 'cyber_neon',
  `level` int(11) NOT NULL DEFAULT 1,
  `xp_points` bigint(20) NOT NULL DEFAULT 0,
  `next_level_xp` bigint(20) NOT NULL DEFAULT 500,
  `tier_rank` varchar(255) NOT NULL DEFAULT 'Silver II',
  `win_streak` int(11) NOT NULL DEFAULT 0,
  `total_matches_played` int(11) NOT NULL DEFAULT 0,
  `total_wins` int(11) NOT NULL DEFAULT 0,
  `aces_count` int(11) NOT NULL DEFAULT 0,
  `mvp_awards` int(11) NOT NULL DEFAULT 0,
  `badges_unlocked` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`badges_unlocked`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `gamer_profiles`
--

INSERT INTO `gamer_profiles` (`id`, `tenant_id`, `customer_id`, `gamer_tag`, `avatar_style`, `level`, `xp_points`, `next_level_xp`, `tier_rank`, `win_streak`, `total_matches_played`, `total_wins`, `aces_count`, `mvp_awards`, `badges_unlocked`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'CYBER_VIPER_99', 'neon_green', 38, 19200, 21000, 'Diamond I', 7, 142, 108, 64, 29, '[\"Court Slayer\",\"Ace Machine\",\"Grand Slam Champion\",\"Night Owl Raider\"]', '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(2, 1, NULL, 'PHANTOM_STRIKER', 'cyber_purple', 45, 28400, 30000, 'Grandmaster', 12, 198, 164, 92, 47, '[\"Invincible 10x\",\"Apex Predator\",\"Rocket Serve\",\"Crowd Favorite\"]', '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(3, 1, NULL, 'VALKYRIE_BLADE', 'electric_cyan', 29, 14100, 16000, 'Platinum III', 4, 95, 67, 38, 18, '[\"Iron Defense\",\"Clutch Master\",\"Padel Wizard\"]', '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(4, 1, NULL, 'TITAN_SHADOW', 'gold_flame', 19, 8400, 10000, 'Gold II', 2, 54, 34, 19, 8, '[\"Rising Star\",\"First Blood\"]', '2026-10-17 17:47:05', '2026-10-17 17:47:05');

-- --------------------------------------------------------

--
-- Table structure for table `game_types`
--

CREATE TABLE `game_types` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sport_id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `default_config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`default_config`)),
  `rules_schema` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`rules_schema`)),
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `general_ledger`
--

CREATE TABLE `general_ledger` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `general_ledger`
--

INSERT INTO `general_ledger` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 3 by Babar Azam', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3000.00, 0.00, '2026-10-16', 'Booking Receipt', 1, 'JRNL-BK-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 14:00:00', '2026-10-16 14:00:00'),
(2, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3000.00, '2026-10-16', 'Booking Receipt', 1, 'JRNL-BK-1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 14:00:00', '2026-10-16 14:00:00'),
(3, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 2 by Zayd Khan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 6000.00, 0.00, '2026-10-06', 'Booking Receipt', 2, 'JRNL-BK-2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-06 18:00:00', '2026-10-06 18:00:00'),
(4, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 6000.00, '2026-10-06', 'Booking Receipt', 2, 'JRNL-BK-2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-06 18:00:00', '2026-10-06 18:00:00'),
(5, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Sharjah Bay) by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2500.00, 0.00, '2026-10-02', 'Booking Receipt', 3, 'JRNL-BK-3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-02 10:00:00', '2026-10-02 10:00:00'),
(6, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Sharjah Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2500.00, '2026-10-02', 'Booking Receipt', 3, 'JRNL-BK-3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-02 10:00:00', '2026-10-02 10:00:00'),
(7, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Melbourne Bay) by Babar Azam', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2500.00, 0.00, '2026-09-19', 'Booking Receipt', 4, 'JRNL-BK-4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-19 15:00:00', '2026-09-19 15:00:00'),
(8, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Melbourne Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2500.00, '2026-09-19', 'Booking Receipt', 4, 'JRNL-BK-4', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-19 15:00:00', '2026-09-19 15:00:00'),
(9, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 2 by Babar Azam', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3000.00, 0.00, '2026-10-12', 'Booking Receipt', 5, 'JRNL-BK-5', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-12 16:00:00', '2026-10-12 16:00:00'),
(10, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3000.00, '2026-10-12', 'Booking Receipt', 5, 'JRNL-BK-5', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-12 16:00:00', '2026-10-12 16:00:00'),
(11, 1, NULL, NULL, NULL, NULL, 'Booking payment for CricketX VR Booth 2 by Zayd Khan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3600.00, 0.00, '2026-09-28', 'Booking Receipt', 6, 'JRNL-BK-6', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-28 11:00:00', '2026-09-28 11:00:00'),
(12, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CricketX VR Booth 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3600.00, '2026-09-28', 'Booking Receipt', 6, 'JRNL-BK-6', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-28 11:00:00', '2026-09-28 11:00:00'),
(13, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 1 by Walk-in Guest', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3000.00, 0.00, '2026-09-20', 'Booking Receipt', 7, 'JRNL-BK-7', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-20 15:00:00', '2026-09-20 15:00:00'),
(14, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3000.00, '2026-09-20', 'Booking Receipt', 7, 'JRNL-BK-7', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-20 15:00:00', '2026-09-20 15:00:00'),
(15, 1, NULL, NULL, NULL, NULL, 'Booking payment for CricketX VR Booth 1 by Faris Ali', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3600.00, 0.00, '2026-10-16', 'Booking Receipt', 8, 'JRNL-BK-8', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 11:00:00', '2026-10-16 11:00:00'),
(16, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CricketX VR Booth 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3600.00, '2026-10-16', 'Booking Receipt', 8, 'JRNL-BK-8', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 11:00:00', '2026-10-16 11:00:00'),
(17, 1, NULL, NULL, NULL, NULL, 'Booking payment for CyberLounge Gaming Arena by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 1200.00, 0.00, '2026-10-07', 'Booking Receipt', 9, 'JRNL-BK-9', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-07 11:00:00', '2026-10-07 11:00:00'),
(18, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CyberLounge Gaming Arena', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 1200.00, '2026-10-07', 'Booking Receipt', 9, 'JRNL-BK-9', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-07 11:00:00', '2026-10-07 11:00:00'),
(19, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Sharjah Bay) by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2500.00, 0.00, '2026-10-15', 'Booking Receipt', 10, 'JRNL-BK-10', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-15 17:00:00', '2026-10-15 17:00:00'),
(20, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Sharjah Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2500.00, '2026-10-15', 'Booking Receipt', 10, 'JRNL-BK-10', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-15 17:00:00', '2026-10-15 17:00:00'),
(21, 1, NULL, NULL, NULL, NULL, 'Booking payment for CyberLounge Gaming Arena by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2400.00, 0.00, '2026-09-27', 'Booking Receipt', 11, 'JRNL-BK-11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-27 14:00:00', '2026-09-27 14:00:00'),
(22, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CyberLounge Gaming Arena', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2400.00, '2026-09-27', 'Booking Receipt', 11, 'JRNL-BK-11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-27 14:00:00', '2026-09-27 14:00:00'),
(23, 1, NULL, NULL, NULL, NULL, 'Booking payment for CyberLounge Gaming Arena by Faris Ali', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 1200.00, 0.00, '2026-09-30', 'Booking Receipt', 12, 'JRNL-BK-12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-30 15:00:00', '2026-09-30 15:00:00'),
(24, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CyberLounge Gaming Arena', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 1200.00, '2026-09-30', 'Booking Receipt', 12, 'JRNL-BK-12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-30 15:00:00', '2026-09-30 15:00:00'),
(25, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 1 by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3000.00, 0.00, '2026-09-22', 'Booking Receipt', 13, 'JRNL-BK-13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-22 18:00:00', '2026-09-22 18:00:00'),
(26, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3000.00, '2026-09-22', 'Booking Receipt', 13, 'JRNL-BK-13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-22 18:00:00', '2026-09-22 18:00:00'),
(27, 1, NULL, NULL, NULL, NULL, 'Booking payment for CricketX VR Booth 1 by Zayd Khan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 1800.00, 0.00, '2026-09-20', 'Booking Receipt', 14, 'JRNL-BK-14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-20 18:00:00', '2026-09-20 18:00:00'),
(28, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CricketX VR Booth 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 1800.00, '2026-09-20', 'Booking Receipt', 14, 'JRNL-BK-14', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-20 18:00:00', '2026-09-20 18:00:00'),
(29, 1, NULL, NULL, NULL, NULL, 'Booking payment for StrikeZone Turf (Futsal & Box Cricket) by Faris Ali', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 4500.00, 0.00, '2026-09-22', 'Booking Receipt', 15, 'JRNL-BK-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-22 11:00:00', '2026-09-22 11:00:00'),
(30, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - StrikeZone Turf (Futsal & Box Cricket)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 4500.00, '2026-09-22', 'Booking Receipt', 15, 'JRNL-BK-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-22 11:00:00', '2026-09-22 11:00:00'),
(31, 1, NULL, NULL, NULL, NULL, 'Booking payment for StrikeZone Turf (Futsal & Box Cricket) by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 4500.00, 0.00, '2026-10-10', 'Booking Receipt', 16, 'JRNL-BK-16', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-10 18:00:00', '2026-10-10 18:00:00'),
(32, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - StrikeZone Turf (Futsal & Box Cricket)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 4500.00, '2026-10-10', 'Booking Receipt', 16, 'JRNL-BK-16', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-10 18:00:00', '2026-10-10 18:00:00'),
(33, 1, NULL, NULL, NULL, NULL, 'Booking payment for CricketX VR Booth 1 by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 1800.00, 0.00, '2026-10-15', 'Booking Receipt', 17, 'JRNL-BK-17', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-15 15:00:00', '2026-10-15 15:00:00'),
(34, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CricketX VR Booth 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 1800.00, '2026-10-15', 'Booking Receipt', 17, 'JRNL-BK-17', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-15 15:00:00', '2026-10-15 15:00:00'),
(35, 1, NULL, NULL, NULL, NULL, 'Booking payment for CricketX VR Booth 2 by Faris Ali', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 1800.00, 0.00, '2026-10-17', 'Booking Receipt', 18, 'JRNL-BK-18', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 10:00:00', '2026-10-17 10:00:00'),
(36, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CricketX VR Booth 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 1800.00, '2026-10-17', 'Booking Receipt', 18, 'JRNL-BK-18', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 10:00:00', '2026-10-17 10:00:00'),
(37, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Sharjah Bay) by Faris Ali', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2500.00, 0.00, '2026-09-19', 'Booking Receipt', 19, 'JRNL-BK-19', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-19 12:00:00', '2026-09-19 12:00:00'),
(38, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Sharjah Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2500.00, '2026-09-19', 'Booking Receipt', 19, 'JRNL-BK-19', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-19 12:00:00', '2026-09-19 12:00:00'),
(39, 1, NULL, NULL, NULL, NULL, 'Booking payment for StrikeZone Turf (Futsal & Box Cricket) by Faris Ali', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 4500.00, 0.00, '2026-10-14', 'Booking Receipt', 20, 'JRNL-BK-20', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-14 15:00:00', '2026-10-14 15:00:00'),
(40, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - StrikeZone Turf (Futsal & Box Cricket)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 4500.00, '2026-10-14', 'Booking Receipt', 20, 'JRNL-BK-20', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-14 15:00:00', '2026-10-14 15:00:00'),
(41, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Melbourne Bay) by Hamza Tariq', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 5000.00, 0.00, '2026-10-05', 'Booking Receipt', 21, 'JRNL-BK-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-05 14:00:00', '2026-10-05 14:00:00'),
(42, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Melbourne Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 5000.00, '2026-10-05', 'Booking Receipt', 21, 'JRNL-BK-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-05 14:00:00', '2026-10-05 14:00:00'),
(43, 1, NULL, NULL, NULL, NULL, 'Booking payment for CricketX VR Booth 1 by Zayd Khan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3600.00, 0.00, '2026-09-24', 'Booking Receipt', 22, 'JRNL-BK-22', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-24 15:00:00', '2026-09-24 15:00:00'),
(44, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CricketX VR Booth 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3600.00, '2026-09-24', 'Booking Receipt', 22, 'JRNL-BK-22', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-24 15:00:00', '2026-09-24 15:00:00'),
(45, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Melbourne Bay) by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2500.00, 0.00, '2026-10-14', 'Booking Receipt', 23, 'JRNL-BK-23', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-14 18:00:00', '2026-10-14 18:00:00'),
(46, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Melbourne Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2500.00, '2026-10-14', 'Booking Receipt', 23, 'JRNL-BK-23', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-14 18:00:00', '2026-10-14 18:00:00'),
(47, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 2 by Mohammad Rizwan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3000.00, 0.00, '2026-10-02', 'Booking Receipt', 24, 'JRNL-BK-24', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-02 11:00:00', '2026-10-02 11:00:00'),
(48, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3000.00, '2026-10-02', 'Booking Receipt', 24, 'JRNL-BK-24', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-02 11:00:00', '2026-10-02 11:00:00'),
(49, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Lord\'s Bay) by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 5000.00, 0.00, '2026-09-20', 'Booking Receipt', 25, 'JRNL-BK-25', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-20 14:00:00', '2026-09-20 14:00:00'),
(50, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Lord\'s Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 5000.00, '2026-09-20', 'Booking Receipt', 25, 'JRNL-BK-25', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-20 14:00:00', '2026-09-20 14:00:00'),
(51, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 3 by Walk-in Guest', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3000.00, 0.00, '2026-10-08', 'Booking Receipt', 26, 'JRNL-BK-26', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-08 17:00:00', '2026-10-08 17:00:00'),
(52, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3000.00, '2026-10-08', 'Booking Receipt', 26, 'JRNL-BK-26', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-08 17:00:00', '2026-10-08 17:00:00'),
(53, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Sharjah Bay) by Faris Ali', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 5000.00, 0.00, '2026-10-05', 'Booking Receipt', 27, 'JRNL-BK-27', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-05 16:00:00', '2026-10-05 16:00:00'),
(54, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Sharjah Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 5000.00, '2026-10-05', 'Booking Receipt', 27, 'JRNL-BK-27', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-05 16:00:00', '2026-10-05 16:00:00'),
(55, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Melbourne Bay) by Walk-in Guest', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2500.00, 0.00, '2026-09-24', 'Booking Receipt', 28, 'JRNL-BK-28', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-24 17:00:00', '2026-09-24 17:00:00'),
(56, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Melbourne Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2500.00, '2026-09-24', 'Booking Receipt', 28, 'JRNL-BK-28', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-24 17:00:00', '2026-09-24 17:00:00'),
(57, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 2 by Mohammad Rizwan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3000.00, 0.00, '2026-09-29', 'Booking Receipt', 29, 'JRNL-BK-29', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-29 16:00:00', '2026-09-29 16:00:00'),
(58, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3000.00, '2026-09-29', 'Booking Receipt', 29, 'JRNL-BK-29', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-29 16:00:00', '2026-09-29 16:00:00'),
(59, 1, NULL, NULL, NULL, NULL, 'Booking payment for StrikeZone Turf (Futsal & Box Cricket) by Mohammad Rizwan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 9000.00, 0.00, '2026-09-26', 'Booking Receipt', 30, 'JRNL-BK-30', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-26 10:00:00', '2026-09-26 10:00:00'),
(60, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - StrikeZone Turf (Futsal & Box Cricket)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 9000.00, '2026-09-26', 'Booking Receipt', 30, 'JRNL-BK-30', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-26 10:00:00', '2026-09-26 10:00:00'),
(61, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Sharjah Bay) by Zayd Khan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2500.00, 0.00, '2026-09-25', 'Booking Receipt', 31, 'JRNL-BK-31', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-25 11:00:00', '2026-09-25 11:00:00'),
(62, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Sharjah Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2500.00, '2026-09-25', 'Booking Receipt', 31, 'JRNL-BK-31', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-25 11:00:00', '2026-09-25 11:00:00'),
(63, 1, NULL, NULL, NULL, NULL, 'Booking payment for CricketX VR Booth 2 by Hamza Tariq', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3600.00, 0.00, '2026-10-11', 'Booking Receipt', 32, 'JRNL-BK-32', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-11 14:00:00', '2026-10-11 14:00:00'),
(64, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CricketX VR Booth 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3600.00, '2026-10-11', 'Booking Receipt', 32, 'JRNL-BK-32', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-11 14:00:00', '2026-10-11 14:00:00'),
(65, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Sharjah Bay) by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 5000.00, 0.00, '2026-10-17', 'Booking Receipt', 33, 'JRNL-BK-33', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:00:00', '2026-10-17 12:00:00'),
(66, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Sharjah Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 5000.00, '2026-10-17', 'Booking Receipt', 33, 'JRNL-BK-33', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 12:00:00', '2026-10-17 12:00:00'),
(67, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 3 by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 6000.00, 0.00, '2026-09-19', 'Booking Receipt', 34, 'JRNL-BK-34', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-19 15:00:00', '2026-09-19 15:00:00'),
(68, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 6000.00, '2026-09-19', 'Booking Receipt', 34, 'JRNL-BK-34', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-19 15:00:00', '2026-09-19 15:00:00'),
(69, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Sharjah Bay) by Zayd Khan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 5000.00, 0.00, '2026-10-10', 'Booking Receipt', 35, 'JRNL-BK-35', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-10 14:00:00', '2026-10-10 14:00:00'),
(70, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Sharjah Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 5000.00, '2026-10-10', 'Booking Receipt', 35, 'JRNL-BK-35', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-10 14:00:00', '2026-10-10 14:00:00'),
(71, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 1 by Babar Azam', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3000.00, 0.00, '2026-10-05', 'Booking Receipt', 36, 'JRNL-BK-36', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-05 15:00:00', '2026-10-05 15:00:00'),
(72, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3000.00, '2026-10-05', 'Booking Receipt', 36, 'JRNL-BK-36', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-05 15:00:00', '2026-10-05 15:00:00'),
(73, 1, NULL, NULL, NULL, NULL, 'Booking payment for CricketX VR Booth 1 by Babar Azam', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 1800.00, 0.00, '2026-10-03', 'Booking Receipt', 37, 'JRNL-BK-37', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-03 18:00:00', '2026-10-03 18:00:00'),
(74, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CricketX VR Booth 1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 1800.00, '2026-10-03', 'Booking Receipt', 37, 'JRNL-BK-37', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-03 18:00:00', '2026-10-03 18:00:00'),
(75, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 3 by Zayd Khan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 6000.00, 0.00, '2026-09-23', 'Booking Receipt', 38, 'JRNL-BK-38', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-23 11:00:00', '2026-09-23 11:00:00'),
(76, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 6000.00, '2026-09-23', 'Booking Receipt', 38, 'JRNL-BK-38', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-23 11:00:00', '2026-09-23 11:00:00'),
(77, 1, NULL, NULL, NULL, NULL, 'Booking payment for Beat It Padel Court 2 by Babar Azam', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 3000.00, 0.00, '2026-09-29', 'Booking Receipt', 39, 'JRNL-BK-39', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-29 12:00:00', '2026-09-29 12:00:00'),
(78, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Beat It Padel Court 2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 3000.00, '2026-09-29', 'Booking Receipt', 39, 'JRNL-BK-39', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-29 12:00:00', '2026-09-29 12:00:00'),
(79, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Sharjah Bay) by Zayd Khan', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 5000.00, 0.00, '2026-10-16', 'Booking Receipt', 40, 'JRNL-BK-40', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 17:00:00', '2026-10-16 17:00:00'),
(80, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Sharjah Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 5000.00, '2026-10-16', 'Booking Receipt', 40, 'JRNL-BK-40', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 17:00:00', '2026-10-16 17:00:00'),
(81, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Sharjah Bay) by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 5000.00, 0.00, '2026-10-12', 'Booking Receipt', 41, 'JRNL-BK-41', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-12 11:00:00', '2026-10-12 11:00:00'),
(82, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Sharjah Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 5000.00, '2026-10-12', 'Booking Receipt', 41, 'JRNL-BK-41', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-12 11:00:00', '2026-10-12 11:00:00'),
(83, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Lord\'s Bay) by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2500.00, 0.00, '2026-10-15', 'Booking Receipt', 42, 'JRNL-BK-42', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-15 12:00:00', '2026-10-15 12:00:00'),
(84, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Lord\'s Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2500.00, '2026-10-15', 'Booking Receipt', 42, 'JRNL-BK-42', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-15 12:00:00', '2026-10-15 12:00:00'),
(85, 1, NULL, NULL, NULL, NULL, 'Booking payment for CyberLounge Gaming Arena by Hamza Tariq', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 1200.00, 0.00, '2026-10-16', 'Booking Receipt', 43, 'JRNL-BK-43', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 17:00:00', '2026-10-16 17:00:00'),
(86, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CyberLounge Gaming Arena', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 1200.00, '2026-10-16', 'Booking Receipt', 43, 'JRNL-BK-43', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-16 17:00:00', '2026-10-16 17:00:00'),
(87, 1, NULL, NULL, NULL, NULL, 'Booking payment for Cricket Reborn (Lord\'s Bay) by Shaheen Afridi', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 5000.00, 0.00, '2026-09-24', 'Booking Receipt', 44, 'JRNL-BK-44', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-24 17:00:00', '2026-09-24 17:00:00'),
(88, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - Cricket Reborn (Lord\'s Bay)', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 5000.00, '2026-09-24', 'Booking Receipt', 44, 'JRNL-BK-44', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-09-24 17:00:00', '2026-09-24 17:00:00'),
(89, 1, NULL, NULL, NULL, NULL, 'Booking payment for CyberLounge Gaming Arena by Hamza Tariq', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 4, 2400.00, 0.00, '2026-10-17', 'Booking Receipt', 45, 'JRNL-BK-45', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 15:00:00', '2026-10-17 15:00:00'),
(90, 1, NULL, NULL, NULL, NULL, 'Court rental revenue earned - CyberLounge Gaming Arena', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 15, 0.00, 2400.00, '2026-10-17', 'Booking Receipt', 45, 'JRNL-BK-45', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 15:00:00', '2026-10-17 15:00:00');

-- --------------------------------------------------------

--
-- Table structure for table `integration_webhooks`
--

CREATE TABLE `integration_webhooks` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `service_key` varchar(255) NOT NULL,
  `service_name` varchar(255) NOT NULL,
  `webhook_url` varchar(255) DEFAULT NULL,
  `api_key` varchar(255) DEFAULT NULL,
  `api_secret` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `last_dispatched_at` timestamp NULL DEFAULT NULL,
  `last_received_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `auto_fetch_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `sync_frequency` varchar(50) NOT NULL DEFAULT 'daily',
  `last_sync_status` varchar(50) DEFAULT NULL,
  `last_sync_message` text DEFAULT NULL,
  `external_api_url` varchar(500) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `integration_webhooks`
--

INSERT INTO `integration_webhooks` (`id`, `tenant_id`, `service_key`, `service_name`, `webhook_url`, `api_key`, `api_secret`, `is_active`, `last_dispatched_at`, `last_received_at`, `created_at`, `updated_at`, `auto_fetch_enabled`, `sync_frequency`, `last_sync_status`, `last_sync_message`, `external_api_url`) VALUES
(1, 1, 'cricket_rebon', 'Cricket Rebon Machine API', 'https://api.cricketrebon.com/v1/sessions/dispatch', 'rebon_live_sec_d92388be87a172dc4fd0', '1afede4e3148fa7d9cdfb78bcd6400bc', 1, NULL, NULL, '2026-10-17 06:35:42', '2026-10-17 06:35:42', 0, 'daily', NULL, NULL, NULL),
(2, 1, 'vr_cricket', 'VR Cricket Simulator API', 'https://api.vrcricket.net/v2/bookings/schedule', 'vrcricket_live_sec_167dc556cb5e46465ead', 'c5382f9bd05e0b42e0ec8684696f05e4', 1, NULL, NULL, '2026-10-17 06:35:42', '2026-10-17 06:35:42', 0, 'daily', NULL, NULL, NULL),
(3, 1, 'restaurant_pos', 'Third-Party Restaurant POS Ingestion', NULL, 'rest_pos_live_6f08f4111add61f3e559', 'f63ff5f51d0051ee61ce6b9eef3f3f93', 1, NULL, NULL, '2026-10-17 06:35:42', '2026-10-17 06:35:42', 0, 'daily', NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `inventory_items`
--

CREATE TABLE `inventory_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `category` varchar(255) DEFAULT NULL,
  `barcode` varchar(255) DEFAULT NULL,
  `sku` varchar(255) DEFAULT NULL,
  `selling_price` decimal(10,2) DEFAULT 0.00,
  `cost_price` decimal(10,2) DEFAULT 0.00,
  `current_stock` decimal(10,2) DEFAULT 0.00,
  `alert_threshold` int(11) DEFAULT 0,
  `reorder_level` int(11) DEFAULT 0,
  `unit` varchar(255) DEFAULT NULL,
  `unit_cost` decimal(10,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `inventory_items`
--

INSERT INTO `inventory_items` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `category`, `barcode`, `sku`, `selling_price`, `cost_price`, `current_stock`, `alert_threshold`, `reorder_level`, `unit`, `unit_cost`) VALUES
(1, 1, NULL, NULL, NULL, 'Babolat Padel Ball Can (3 Balls)', NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 11:59:34', '2026-10-17 11:59:34', 'Padel Equipment', '8901234001', 'PAD-BAL-01', 2200.00, 1600.00, 5.00, 10, 10, NULL, 0.00),
(2, 1, NULL, NULL, NULL, 'Head Extreme Pro Racket Rental', NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 11:59:34', '2026-10-17 11:59:34', 'Rental Equipment', '8901234002', 'RNT-RCK-01', 500.00, 0.00, 20.00, 5, 5, NULL, 0.00),
(3, 1, NULL, NULL, NULL, 'Aquafina Mineral Water 500ml', NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 11:59:34', '2026-10-17 11:59:34', 'Beverages & Nutrition', '8901234003', 'BEV-WAT-01', 100.00, 50.00, 120.00, 24, 24, NULL, 0.00),
(4, 1, NULL, NULL, NULL, 'Gatorade Sports Energy 500ml', NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 11:59:34', '2026-10-17 11:59:34', 'Beverages & Nutrition', '8901234004', 'BEV-GAT-01', 350.00, 220.00, 60.00, 15, 15, NULL, 0.00);

-- --------------------------------------------------------

--
-- Table structure for table `invoices`
--

CREATE TABLE `invoices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `kds_orders`
--

CREATE TABLE `kds_orders` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `order_number` varchar(50) NOT NULL,
  `customer_name` varchar(255) NOT NULL,
  `table_or_court` varchar(100) DEFAULT NULL,
  `items_json` text NOT NULL,
  `total_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `prepared_at` timestamp NULL DEFAULT NULL,
  `served_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `kds_orders`
--

INSERT INTO `kds_orders` (`id`, `tenant_id`, `order_number`, `customer_name`, `table_or_court`, `items_json`, `total_amount`, `status`, `prepared_at`, `served_at`, `created_at`, `updated_at`) VALUES
(1, 1, 'KDS-001', 'Saad Minhas', 'Court 1 Bench', '[{\"name\":\"Electrolyte Sports Drink\",\"qty\":2,\"notes\":\"Chilled\"},{\"name\":\"Club Sandwich & Fries\",\"qty\":1,\"notes\":\"Extra spicy\"}]', 1450.00, 'preparing', NULL, NULL, '2026-10-17 16:18:23', '2026-10-17 16:28:23'),
(2, 1, 'KDS-002', 'Hamza Ali', 'Café Table 3', '[{\"name\":\"Iced Americano\",\"qty\":2,\"notes\":\"Oat milk\"},{\"name\":\"Protein Energy Bar\",\"qty\":2,\"notes\":\"Almond\"}]', 1800.00, 'ready', '2026-10-17 16:26:23', NULL, '2026-10-17 16:10:23', '2026-10-17 16:26:23'),
(3, 1, 'KDS-003', 'Bilal Sheikh', 'Court 3 Dugout', '[{\"name\":\"Fresh Lemonade Pitcher\",\"qty\":1,\"notes\":\"Mint & rock salt\"}]', 850.00, 'pending', NULL, NULL, '2026-10-17 16:25:23', '2026-10-17 16:28:23');

-- --------------------------------------------------------

--
-- Table structure for table `kiosk_checkin_logs`
--

CREATE TABLE `kiosk_checkin_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `terminal_name` varchar(255) NOT NULL DEFAULT 'Turnstile Gate A (Main Entry)',
  `player_name` varchar(255) NOT NULL,
  `verification_method` varchar(30) NOT NULL DEFAULT 'Face Recognition',
  `court_assigned` varchar(255) NOT NULL DEFAULT 'Court 1 (Panoramic Glass)',
  `match_time_slot` varchar(255) NOT NULL DEFAULT '08:00 PM - 09:00 PM',
  `turnstile_action` varchar(30) NOT NULL DEFAULT 'Gate Unlocked',
  `temperature_ok` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `kiosk_checkin_logs`
--

INSERT INTO `kiosk_checkin_logs` (`id`, `tenant_id`, `terminal_name`, `player_name`, `verification_method`, `court_assigned`, `match_time_slot`, `turnstile_action`, `temperature_ok`, `created_at`, `updated_at`) VALUES
(1, 1, 'Turnstile Gate A (Court 1 & 2)', 'Daniyal Ahmed', 'Face Recognition (AI Gate)', 'Court 1 (Panoramic Glass)', '08:00 PM - 09:30 PM', 'Gate Unlocked (Pass Granted)', 1, '2026-10-17 17:01:37', '2026-10-17 17:01:37'),
(2, 1, 'Turnstile Gate B (Padel Arena)', 'Hamza Tariq', 'WhatsApp Dynamic QR', 'Court 3 (Central Show Court)', '08:30 PM - 10:00 PM', 'Gate Unlocked (Pass Granted)', 1, '2026-10-17 17:08:37', '2026-10-17 17:08:37'),
(3, 1, 'Turnstile Gate A (Court 1 & 2)', 'Zeeshan Khan', 'Apple Wallet NFC Tap', 'Court 2 (Pro Turf)', '09:00 PM - 10:30 PM', 'Gate Unlocked (Pass Granted)', 1, '2026-10-17 17:11:37', '2026-10-17 17:11:37');

-- --------------------------------------------------------

--
-- Table structure for table `leagues`
--

CREATE TABLE `leagues` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `leases`
--

CREATE TABLE `leases` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `unit_id` int(11) DEFAULT 0,
  `renter_id` int(11) DEFAULT 0,
  `monthly_rent` decimal(12,2) DEFAULT 0.00,
  `deposit_amount` decimal(12,2) DEFAULT 0.00,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `billing_day` int(11) DEFAULT 0,
  `grace_days` int(11) DEFAULT 0,
  `late_fine_rate` decimal(8,2) DEFAULT 0.00,
  `tenant_name` varchar(255) DEFAULT NULL,
  `rent_type` varchar(50) NOT NULL DEFAULT 'fixed',
  `reported_revenue` decimal(15,2) DEFAULT NULL,
  `pos_api_key` varchar(100) DEFAULT NULL,
  `pos_api_secret` varchar(100) DEFAULT NULL,
  `external_pos_url` varchar(500) DEFAULT NULL,
  `auto_sync_enabled` tinyint(1) NOT NULL DEFAULT 0,
  `sync_frequency` varchar(50) NOT NULL DEFAULT 'daily',
  `last_synced_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `leases`
--

INSERT INTO `leases` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `unit_id`, `renter_id`, `monthly_rent`, `deposit_amount`, `start_date`, `end_date`, `billing_day`, `grace_days`, `late_fine_rate`, `tenant_name`, `rent_type`, `reported_revenue`, `pos_api_key`, `pos_api_secret`, `external_pos_url`, `auto_sync_enabled`, `sync_frequency`, `last_synced_at`) VALUES
(1, 1, NULL, NULL, NULL, NULL, NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 1, 1, 85000.00, 170000.00, '2026-01-01', '2026-12-31', 1, 5, 2.00, 'FitBites Café & Nutrition', 'revenue_share', 1120000.00, 'tenant_1_4c91c6e98d236d29', '46df70a320c9497a3318cedc60d45ad5', 'https://pos.tenant1.com/api/v1/daily-sales', 1, 'daily', NULL),
(2, 1, NULL, NULL, NULL, NULL, NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 2, 2, 65000.00, 130000.00, '2026-02-01', '2027-01-31', 1, 5, 1.50, 'Ace Tennis & Padel Pro Equipment', 'fixed', NULL, 'tenant_2_15f0f56a98df07fc', '98364a9646911ef07b4bea6e814e5eab', NULL, 0, 'daily', NULL),
(3, 1, NULL, NULL, NULL, NULL, NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 3, 3, 150000.00, 300000.00, '2026-01-15', '2027-01-14', 1, 7, 2.50, 'The Dugout Sports Bar & Grill', 'revenue_share', 2450000.00, 'tenant_3_e6fc9ee702e8e6b7', '857b5ba0be5c6ce424f8d1243194a6da', 'https://pos.tenant3.com/api/v1/daily-sales', 1, 'daily', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `leave_requests`
--

CREATE TABLE `leave_requests` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `employee_id` bigint(20) UNSIGNED NOT NULL,
  `leave_type` varchar(255) NOT NULL DEFAULT 'annual',
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `total_days` int(11) NOT NULL DEFAULT 1,
  `reason` text DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `approved_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ledger_transactions`
--

CREATE TABLE `ledger_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `live_matches`
--

CREATE TABLE `live_matches` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `facility_id` bigint(20) UNSIGNED NOT NULL,
  `sport_type` varchar(255) NOT NULL DEFAULT 'cricket',
  `match_title` varchar(255) NOT NULL DEFAULT 'Exhibition Match',
  `team_a_name` varchar(255) NOT NULL DEFAULT 'Team Alpha',
  `team_b_name` varchar(255) NOT NULL DEFAULT 'Team Phoenix',
  `status` varchar(255) NOT NULL DEFAULT 'live',
  `batting_team` varchar(255) NOT NULL DEFAULT 'team_a',
  `team_a_runs` int(11) NOT NULL DEFAULT 0,
  `team_a_wickets` int(11) NOT NULL DEFAULT 0,
  `team_a_overs` decimal(5,1) NOT NULL DEFAULT 0.0,
  `team_b_runs` int(11) NOT NULL DEFAULT 0,
  `team_b_wickets` int(11) NOT NULL DEFAULT 0,
  `team_b_overs` decimal(5,1) NOT NULL DEFAULT 0.0,
  `target_overs` decimal(4,1) NOT NULL DEFAULT 6.0,
  `target_runs` int(11) DEFAULT NULL,
  `padel_sets_a` varchar(255) NOT NULL DEFAULT '0',
  `padel_sets_b` varchar(255) NOT NULL DEFAULT '0',
  `padel_points_a` varchar(255) NOT NULL DEFAULT '0',
  `padel_points_b` varchar(255) NOT NULL DEFAULT '0',
  `server_indicator` varchar(255) NOT NULL DEFAULT 'a',
  `striker_name` varchar(255) NOT NULL DEFAULT 'Player 1',
  `striker_runs` int(11) NOT NULL DEFAULT 0,
  `striker_balls` int(11) NOT NULL DEFAULT 0,
  `non_striker_name` varchar(255) NOT NULL DEFAULT 'Player 2',
  `non_striker_runs` int(11) NOT NULL DEFAULT 0,
  `non_striker_balls` int(11) NOT NULL DEFAULT 0,
  `bowler_name` varchar(255) NOT NULL DEFAULT 'Bowler 1',
  `bowler_runs` int(11) NOT NULL DEFAULT 0,
  `bowler_overs` decimal(4,1) NOT NULL DEFAULT 0.0,
  `bowler_wickets` int(11) NOT NULL DEFAULT 0,
  `recent_balls` text DEFAULT NULL,
  `custom_banner` varchar(255) DEFAULT NULL,
  `assigned_scorer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `scorer_pin` varchar(10) NOT NULL DEFAULT '1234',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `futsal_goals_a` int(11) NOT NULL DEFAULT 0,
  `futsal_goals_b` int(11) NOT NULL DEFAULT 0,
  `futsal_fouls_a` int(11) NOT NULL DEFAULT 0,
  `futsal_fouls_b` int(11) NOT NULL DEFAULT 0,
  `futsal_half` int(11) NOT NULL DEFAULT 1,
  `futsal_timer_seconds` int(11) NOT NULL DEFAULT 1200,
  `futsal_timer_running` tinyint(1) NOT NULL DEFAULT 0,
  `snooker_frames_a` int(11) NOT NULL DEFAULT 0,
  `snooker_frames_b` int(11) NOT NULL DEFAULT 0,
  `snooker_points_a` int(11) NOT NULL DEFAULT 0,
  `snooker_points_b` int(11) NOT NULL DEFAULT 0,
  `snooker_current_break` int(11) NOT NULL DEFAULT 0,
  `snooker_turn` varchar(255) NOT NULL DEFAULT 'player_a',
  `snooker_best_of_frames` int(11) NOT NULL DEFAULT 5,
  `padel_games_a` int(11) NOT NULL DEFAULT 0,
  `padel_games_b` int(11) NOT NULL DEFAULT 0,
  `padel_set_number` int(11) NOT NULL DEFAULT 1,
  `team_a_players` text DEFAULT NULL,
  `team_b_players` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `live_matches`
--

INSERT INTO `live_matches` (`id`, `tenant_id`, `facility_id`, `sport_type`, `match_title`, `team_a_name`, `team_b_name`, `status`, `batting_team`, `team_a_runs`, `team_a_wickets`, `team_a_overs`, `team_b_runs`, `team_b_wickets`, `team_b_overs`, `target_overs`, `target_runs`, `padel_sets_a`, `padel_sets_b`, `padel_points_a`, `padel_points_b`, `server_indicator`, `striker_name`, `striker_runs`, `striker_balls`, `non_striker_name`, `non_striker_runs`, `non_striker_balls`, `bowler_name`, `bowler_runs`, `bowler_overs`, `bowler_wickets`, `recent_balls`, `custom_banner`, `assigned_scorer_id`, `scorer_pin`, `created_at`, `updated_at`, `futsal_goals_a`, `futsal_goals_b`, `futsal_fouls_a`, `futsal_fouls_b`, `futsal_half`, `futsal_timer_seconds`, `futsal_timer_running`, `snooker_frames_a`, `snooker_frames_b`, `snooker_points_a`, `snooker_points_b`, `snooker_current_break`, `snooker_turn`, `snooker_best_of_frames`, `padel_games_a`, `padel_games_b`, `padel_set_number`, `team_a_players`, `team_b_players`) VALUES
(1, 1, 1, 'cricket', 'Gaming Arena Super League — Match 01', 'Lahore Strikers', 'Karachi Blasters', 'live', 'team_a', 54, 2, 4.0, 0, 0, 0.0, 6.0, NULL, '0', '0', '0', '0', 'a', 'Babar K.', 34, 14, 'Rizwan M.', 16, 9, 'Shaheen A.', 24, 1.4, 1, '[\"6\",\"0\",\"1\",\"4\",\"0\",\"6\",\"W\",\"1\"]', 'SIX! 🔥', NULL, '7788', '2026-10-17 12:28:33', '2026-10-17 13:14:37', 0, 0, 0, 0, 1, 1200, 0, 0, 0, 0, 0, 0, 'player_a', 5, 0, 0, 1, '[\"Babar K.\",\"Rizwan M.\",\"Fakhar Z.\",\"Saim A.\",\"Shadab K.\",\"Shaheen A.\",\"Naseem S.\"]', '[\"Rohit S.\",\"Virat K.\",\"Surya Y.\",\"Hardik P.\",\"Jasprit B.\",\"Kuldeep Y.\"]'),
(2, 1, 6, 'padel', 'Beat It Padel Pro Championship — Semi Final', 'Hamza & Bilal (Team Alpha)', 'Taimoor & Saad (Team Beta)', 'completed', 'team_a', 0, 0, 0.0, 0, 0, 0.0, 6.0, NULL, '2', '0', '0', '0', 'a', 'Player 1', 0, 0, 'Player 2', 0, 0, 'Bowler 1', 0, 0.0, 0, NULL, 'CHAMPIONSHIP MATCH WON by Hamza & Bilal (Team Alpha)! 🏆🥇', NULL, '2233', '2026-10-17 13:13:25', '2026-10-17 18:14:58', 0, 0, 0, 0, 1, 1200, 0, 0, 0, 0, 0, 0, 'player_a', 5, 0, 0, 2, '[\"Hamza Ali\",\"Bilal Tariq\"]', '[\"Taimoor Khan\",\"Saad Farooq\"]'),
(3, 1, 9, 'futsal', 'Gaming Arena Midnight Futsal Cup — Final', 'Red Devils FC', 'Thunderbolts United', 'live', 'team_a', 0, 0, 0.0, 0, 0, 0.0, 6.0, NULL, '0', '0', '0', '0', 'a', 'Player 1', 0, 0, 'Player 2', 0, 0, 'Bowler 1', 0, 0.0, 0, NULL, 'FOUL! 🟨 (Team A)', NULL, '5566', '2026-10-17 13:13:25', '2026-10-17 13:27:38', 3, 2, 5, 4, 2, 780, 1, 0, 0, 0, 0, 0, 'player_a', 5, 0, 0, 1, '[\"Zayn Malik\",\"Ali Raza\",\"Farhan Qureshi\",\"Daniyal Sheikh\",\"Omer Butt\"]', '[\"Rashid Mehmood\",\"Kashif Khan\",\"Musa Tariq\",\"Waqas Ahmed\",\"Hassan Bilal\"]'),
(4, 1, 11, 'snooker', 'Gaming Arena Masters Snooker Trophy — Best of 5 Frames', 'Hamza Asif', 'Muhammad Sajjad', 'live', 'team_a', 0, 0, 0.0, 0, 0, 0.0, 6.0, NULL, '0', '0', '0', '0', 'a', 'Player 1', 0, 0, 'Player 2', 0, 0, 'Bowler 1', 0, 0.0, 0, NULL, NULL, NULL, '9900', '2026-10-17 13:13:25', '2026-10-17 13:13:25', 0, 0, 0, 0, 1, 1200, 0, 2, 1, 54, 38, 26, 'player_a', 5, 0, 0, 1, '[\"Hamza Asif\"]', '[\"Muhammad Sajjad\"]');

-- --------------------------------------------------------

--
-- Table structure for table `loyalty_earn_settings`
--

CREATE TABLE `loyalty_earn_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `enabled` tinyint(1) NOT NULL DEFAULT 1,
  `points_per_amount` decimal(10,2) NOT NULL DEFAULT 1.00,
  `per_amount_unit` decimal(10,2) NOT NULL DEFAULT 100.00,
  `redemption_rate` decimal(10,4) NOT NULL DEFAULT 0.5000,
  `min_points_to_redeem` int(11) NOT NULL DEFAULT 100,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `cash_value_per_point` decimal(10,4) NOT NULL DEFAULT 0.5000,
  `silver_min_spend` decimal(12,2) NOT NULL DEFAULT 25000.00,
  `gold_min_spend` decimal(12,2) NOT NULL DEFAULT 60000.00,
  `platinum_min_spend` decimal(12,2) NOT NULL DEFAULT 120000.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `loyalty_earn_settings`
--

INSERT INTO `loyalty_earn_settings` (`id`, `tenant_id`, `enabled`, `points_per_amount`, `per_amount_unit`, `redemption_rate`, `min_points_to_redeem`, `created_at`, `updated_at`, `cash_value_per_point`, `silver_min_spend`, `gold_min_spend`, `platinum_min_spend`) VALUES
(1, 1, 1, 1.00, 100.00, 0.5000, 100, '2026-10-17 12:07:21', '2026-10-17 12:07:21', 0.5000, 25000.00, 60000.00, 120000.00);

-- --------------------------------------------------------

--
-- Table structure for table `loyalty_rewards`
--

CREATE TABLE `loyalty_rewards` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `point_cost` int(11) NOT NULL,
  `reward_type` varchar(255) NOT NULL DEFAULT 'voucher',
  `reward_value` decimal(10,2) NOT NULL DEFAULT 0.00,
  `status` varchar(20) NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `loyalty_rewards`
--

INSERT INTO `loyalty_rewards` (`id`, `tenant_id`, `name`, `description`, `point_cost`, `reward_type`, `reward_value`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Free Padel Racket Rental', 'Get 1 session pro racket rental free', 200, 'free_service', 500.00, 'active', '2026-10-17 12:07:21', '2026-10-17 12:07:21'),
(2, 1, 'PKR 500 Discount Voucher', 'Applicable on any court booking or pro-shop item', 500, 'discount', 500.00, 'active', '2026-10-17 12:07:21', '2026-10-17 12:07:21'),
(3, 1, 'Free Energy Drink Can', '1 Free Gatorade or Red Bull from Pro Shop', 150, 'free_product', 350.00, 'active', '2026-10-17 12:07:21', '2026-10-17 12:07:21');

-- --------------------------------------------------------

--
-- Table structure for table `loyalty_transactions`
--

CREATE TABLE `loyalty_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `points` int(11) NOT NULL DEFAULT 0,
  `booking_id` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `maintenance_records`
--

CREATE TABLE `maintenance_records` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `maintenance_windows`
--

CREATE TABLE `maintenance_windows` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `match_ball_logs`
--

CREATE TABLE `match_ball_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `live_match_id` bigint(20) UNSIGNED NOT NULL,
  `event_type` varchar(255) NOT NULL,
  `runs_awarded` int(11) NOT NULL DEFAULT 0,
  `is_legal_ball` tinyint(1) NOT NULL DEFAULT 1,
  `commentary` varchar(255) DEFAULT NULL,
  `state_snapshot` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `match_ball_logs`
--

INSERT INTO `match_ball_logs` (`id`, `live_match_id`, `event_type`, `runs_awarded`, `is_legal_ball`, `commentary`, `state_snapshot`, `created_at`, `updated_at`) VALUES
(1, 1, 'run', 0, 1, 'Babar K. scored 0 run(s)', NULL, '2026-10-17 13:09:29', '2026-10-17 13:09:29'),
(2, 1, 'boundary_6', 6, 1, 'Babar K. scored 6 run(s)', NULL, '2026-10-17 13:09:33', '2026-10-17 13:09:33');

-- --------------------------------------------------------

--
-- Table structure for table `match_events`
--

CREATE TABLE `match_events` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `match_id` bigint(20) UNSIGNED NOT NULL,
  `seq_number` int(11) NOT NULL,
  `idempotency_key` varchar(255) DEFAULT NULL,
  `event_type` varchar(255) NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`payload`)),
  `recorded_by` bigint(20) UNSIGNED DEFAULT NULL,
  `is_undone` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `match_highlights`
--

CREATE TABLE `match_highlights` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `live_match_id` bigint(20) UNSIGNED DEFAULT NULL,
  `sport_type` varchar(50) NOT NULL,
  `player_name` varchar(100) DEFAULT NULL,
  `title` varchar(150) NOT NULL,
  `moment_type` varchar(50) NOT NULL,
  `timestamp_info` varchar(100) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `match_highlights_studio`
--

CREATE TABLE `match_highlights_studio` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `match_id` bigint(20) UNSIGNED DEFAULT NULL,
  `match_title` varchar(255) NOT NULL,
  `sport_type` varchar(255) NOT NULL DEFAULT 'padel',
  `mvp_player_name` varchar(255) NOT NULL,
  `mvp_gamer_tag` varchar(255) DEFAULT NULL,
  `mvp_rating_score` int(11) NOT NULL DEFAULT 94,
  `radar_stats` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`radar_stats`)),
  `clip_video_url` varchar(255) DEFAULT NULL,
  `social_share_card_url` varchar(255) DEFAULT NULL,
  `views_count` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `match_highlights_studio`
--

INSERT INTO `match_highlights_studio` (`id`, `tenant_id`, `match_id`, `match_title`, `sport_type`, `mvp_player_name`, `mvp_gamer_tag`, `mvp_rating_score`, `radar_stats`, `clip_video_url`, `social_share_card_url`, `views_count`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Red Bull Grand Slam Finals: Court 1', 'padel', 'Farhan Zaidi', 'PHANTOM_STRIKER', 98, '{\"Smash Power\":97,\"Reflex Agility\":95,\"Serve Accuracy\":94,\"Stamina\":99,\"Court Vision\":98}', 'https://assets.mixkit.co/videos/preview/mixkit-tennis-player-hits-the-ball-41589-large.mp4', '/cards/mvp_farhan_finals.png', 1420, '2026-10-17 17:47:05', '2026-10-17 17:47:05'),
(2, 1, 2, 'VR Cricket Super Over Championship', 'cricket', 'Ali Haider', 'CYBER_VIPER_99', 96, '{\"Smash Power\":98,\"Reflex Agility\":91,\"Serve Accuracy\":96,\"Stamina\":92,\"Court Vision\":94}', 'https://assets.mixkit.co/videos/preview/mixkit-cricket-batsman-hitting-the-ball-41595-large.mp4', '/cards/mvp_ali_cricket.png', 890, '2026-10-17 17:47:05', '2026-10-17 17:47:05');

-- --------------------------------------------------------

--
-- Table structure for table `match_lobbies`
--

CREATE TABLE `match_lobbies` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `creator_name` varchar(100) NOT NULL,
  `creator_mobile` varchar(30) NOT NULL,
  `sport` varchar(50) NOT NULL DEFAULT 'Padel',
  `skill_level` varchar(50) NOT NULL DEFAULT 'Intermediate',
  `preferred_court` varchar(100) DEFAULT NULL,
  `match_time` datetime NOT NULL,
  `players_needed` int(11) NOT NULL DEFAULT 2,
  `players_joined` int(11) NOT NULL DEFAULT 1,
  `status` varchar(20) NOT NULL DEFAULT 'open',
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `match_lobbies`
--

INSERT INTO `match_lobbies` (`id`, `tenant_id`, `creator_name`, `creator_mobile`, `sport`, `skill_level`, `preferred_court`, `match_time`, `players_needed`, `players_joined`, `status`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 'Daniyal Ahmed', '03009988776', 'Padel', 'Intermediate (Level 3.5)', 'Padel Court 1 (Panoramic)', '2026-10-18 00:16:04', 2, 2, 'open', 'Looking for 2 intermediate players for a competitive doubles game tonight.', '2026-10-17 16:16:04', '2026-10-17 16:16:04'),
(2, 1, 'Hamza Malik', '03214455667', 'Box Cricket', 'Casual / Fun', 'VR / Box Cricket Turf', '2026-10-18 20:16:04', 3, 5, 'open', 'Friendly tape ball 8-a-side match. Refreshments on loser team!', '2026-10-17 16:16:04', '2026-10-17 16:16:04');

-- --------------------------------------------------------

--
-- Table structure for table `match_overs_log`
--

CREATE TABLE `match_overs_log` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `live_match_id` bigint(20) UNSIGNED NOT NULL,
  `over_number` int(11) NOT NULL,
  `innings` varchar(255) NOT NULL DEFAULT 'team_a',
  `bowler_name` varchar(255) NOT NULL,
  `runs_conceded` int(11) NOT NULL DEFAULT 0,
  `wickets_taken` int(11) NOT NULL DEFAULT 0,
  `balls_summary` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `match_player_stats`
--

CREATE TABLE `match_player_stats` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `live_match_id` bigint(20) UNSIGNED NOT NULL,
  `team_id` bigint(20) UNSIGNED DEFAULT NULL,
  `player_name` varchar(255) NOT NULL,
  `sport_type` varchar(255) NOT NULL,
  `runs_scored` int(11) NOT NULL DEFAULT 0,
  `balls_faced` int(11) NOT NULL DEFAULT 0,
  `fours` int(11) NOT NULL DEFAULT 0,
  `sixes` int(11) NOT NULL DEFAULT 0,
  `dismissal_info` varchar(255) DEFAULT NULL,
  `overs_bowled` decimal(4,1) NOT NULL DEFAULT 0.0,
  `runs_conceded` int(11) NOT NULL DEFAULT 0,
  `wickets_taken` int(11) NOT NULL DEFAULT 0,
  `maidens` int(11) NOT NULL DEFAULT 0,
  `goals` int(11) NOT NULL DEFAULT 0,
  `assists` int(11) NOT NULL DEFAULT 0,
  `yellow_cards` int(11) NOT NULL DEFAULT 0,
  `red_cards` int(11) NOT NULL DEFAULT 0,
  `fouls_committed` int(11) NOT NULL DEFAULT 0,
  `individual_points` int(11) NOT NULL DEFAULT 0,
  `aces` int(11) NOT NULL DEFAULT 0,
  `unforced_errors` int(11) NOT NULL DEFAULT 0,
  `highest_break` int(11) NOT NULL DEFAULT 0,
  `frames_won` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `match_states`
--

CREATE TABLE `match_states` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `match_id` bigint(20) UNSIGNED NOT NULL,
  `last_seq_number` int(11) NOT NULL DEFAULT 0,
  `current_state` varchar(255) NOT NULL,
  `score_summary` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`score_summary`)),
  `detailed_scorecard` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`detailed_scorecard`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `match_summary_cards`
--

CREATE TABLE `match_summary_cards` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `booking_id` bigint(20) UNSIGNED DEFAULT NULL,
  `match_title` varchar(150) NOT NULL DEFAULT 'Men Singles Division A Final',
  `player_one_name` varchar(100) NOT NULL,
  `player_two_name` varchar(100) NOT NULL,
  `scoreline` varchar(100) NOT NULL DEFAULT '6-4, 3-6, 7-6 (5)',
  `duration_minutes` int(11) NOT NULL DEFAULT 85,
  `mvp_player` varchar(100) NOT NULL DEFAULT 'Daniyal Ahmed',
  `elo_points_delta` int(11) NOT NULL DEFAULT 32,
  `court_name` varchar(100) NOT NULL DEFAULT 'Court 1 (Panoramic Glass)',
  `whatsapp_share_url` varchar(255) DEFAULT NULL,
  `card_status` varchar(30) NOT NULL DEFAULT 'generated',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `match_summary_cards`
--

INSERT INTO `match_summary_cards` (`id`, `tenant_id`, `booking_id`, `match_title`, `player_one_name`, `player_two_name`, `scoreline`, `duration_minutes`, `mvp_player`, `elo_points_delta`, `court_name`, `whatsapp_share_url`, `card_status`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'Padel Grand Championship Semis', 'Daniyal Ahmed & Bilal Malik', 'Hamza Tariq & Zeeshan Khan', '6-4, 5-7, 7-6 (10-8)', 95, 'Daniyal Ahmed', 45, 'Court 1 (Panoramic Glass)', 'https://wa.me/?text=%F0%9F%8E%BE+Match+Complete+at+Gaming+Arena%21%0AScore%3A+6-4%2C+5-7%2C+7-6%0AMVP%3A+Daniyal+Ahmed+%28%2B45+ELO%29%0APlay+replay+%26+scorecard+on+Gaming+Arena+OS.', 'dispatched', '2026-10-17 15:23:36', '2026-10-17 15:23:36'),
(2, 1, NULL, 'Friday Night Casual Mixed Doubles', 'Sara Farooq & Ayesha Malik', 'Khadija Noor & Zainab Raza', '6-2, 6-3', 50, 'Sara Farooq', 20, 'Court 2 (Pro Turf)', 'https://wa.me/?text=%F0%9F%8E%BE+Gaming+Arena+Scorecard%3A+Sara+%26+Ayesha+won+6-2%2C+6-3%21', 'generated', '2026-10-17 16:53:36', '2026-10-17 16:53:36');

-- --------------------------------------------------------

--
-- Table structure for table `medical_incident_reports`
--

CREATE TABLE `medical_incident_reports` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `incident_ref` varchar(50) NOT NULL,
  `injured_person_name` varchar(255) NOT NULL,
  `person_type` varchar(30) NOT NULL DEFAULT 'player',
  `location_court` varchar(255) NOT NULL,
  `injury_type` varchar(255) NOT NULL,
  `first_aid_administered` varchar(255) NOT NULL,
  `first_responder_name` varchar(255) NOT NULL,
  `severity_level` varchar(20) NOT NULL DEFAULT 'minor',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `medical_incident_reports`
--

INSERT INTO `medical_incident_reports` (`id`, `tenant_id`, `incident_ref`, `injured_person_name`, `person_type`, `location_court`, `injury_type`, `first_aid_administered`, `first_responder_name`, `severity_level`, `created_at`, `updated_at`) VALUES
(1, 1, 'MED-042', 'Usman Tariq', 'player', 'Court 2 (Pro Turf)', 'Right ankle inversion strain', 'Cryotherapy ice pack applied, compression bandage, seated in recovery lounge', 'Coach Irfan (Certified First Aider)', 'minor', '2026-10-17 11:39:46', '2026-10-17 11:39:46'),
(2, 1, 'MED-043', 'Bilal Sheikh', 'player', 'Court 1 Glass Wall', 'Index finger abrasion', 'Antiseptic wash, sterile gauze bandage applied', 'Front Desk Duty Officer', 'minor', '2026-10-16 16:39:46', '2026-10-16 16:39:46');

-- --------------------------------------------------------

--
-- Table structure for table `memberships`
--

CREATE TABLE `memberships` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2026_09_23_132557_create_personal_access_tokens_table', 1),
(5, '2026_10_02_084313_create_missing_tables_for_testing', 1),
(6, '2026_10_13_080009_create_sports_and_tournaments_tables', 1),
(7, '2026_10_18_003352_create_fixed_assets_table', 2),
(8, '2026_10_18_010000_create_cms_and_media_tables', 3),
(9, '2026_10_18_012000_add_domain_columns_to_users_table', 4),
(10, '2026_10_18_013000_create_payment_webhook_events_table', 5),
(11, '2026_10_18_014000_create_warehouse_stock_table', 6),
(12, '2026_10_18_015000_add_details_to_audit_log_table', 7);

-- --------------------------------------------------------

--
-- Table structure for table `mobile_push_notifications`
--

CREATE TABLE `mobile_push_notifications` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `campaign_title` varchar(255) NOT NULL,
  `notification_body` text NOT NULL,
  `target_audience` varchar(50) NOT NULL DEFAULT 'all_players',
  `recipients_count` int(11) NOT NULL DEFAULT 0,
  `deep_link_url` varchar(255) DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'dispatched',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `mobile_push_notifications`
--

INSERT INTO `mobile_push_notifications` (`id`, `tenant_id`, `campaign_title`, `notification_body`, `target_audience`, `recipients_count`, `deep_link_url`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, '⚡ Weekend Prime Slots Now Open!', 'Book Court 1 & 2 for Saturday night before slots fill up. 20% discount on Early-Bird morning matches!', 'all_players', 1420, '/console/bookings', 'dispatched', '2026-10-17 08:39:46', '2026-10-17 08:39:46'),
(2, 1, '🏆 Padel Premier Open 2026 Finals Tonight!', 'Grand Finale: Farhan & Ahmed vs Zayd & Omer at 8:30 PM. Live spectators welcome with free refreshments.', 'vip_members', 380, '/console/tournaments/brackets', 'dispatched', '2026-10-17 14:39:46', '2026-10-17 14:39:46');

-- --------------------------------------------------------

--
-- Table structure for table `module_registry`
--

CREATE TABLE `module_registry` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `module_key` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `category` varchar(50) NOT NULL DEFAULT 'operations',
  `icon` varchar(50) DEFAULT NULL,
  `is_core` tinyint(1) NOT NULL DEFAULT 0,
  `enabled` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `module_registry`
--

INSERT INTO `module_registry` (`id`, `module_key`, `name`, `description`, `category`, `icon`, `is_core`, `enabled`, `created_at`, `updated_at`) VALUES
(1, 'booking', 'Court & Field Reservations', 'Real-time slot engine with 3D map', 'operations', '📅', 1, 1, '2026-10-17 12:07:21', '2026-10-17 12:07:21'),
(2, 'pos', 'POS Register & Pro-Shop', 'Cash drawer and equipment billing', 'sales', '💳', 1, 1, '2026-10-17 12:07:21', '2026-10-17 12:07:21'),
(3, 'tournaments', 'Sports Tournaments & Leagues', 'Brackets, schedules and categories', 'sports', '🏆', 0, 1, '2026-10-17 12:07:21', '2026-10-17 12:07:21'),
(4, 'property', 'Property & Commercial Leases', 'Rooftop cafes and restaurant revenue sharing', 'property', '🏢', 0, 1, '2026-10-17 12:07:21', '2026-10-17 12:07:21'),
(5, 'cricket_rebon', 'Cricket Rebon Hardware Integration', 'Auto-bowling simulator webhook dispatch', 'integrations', '🏏', 0, 1, '2026-10-17 12:07:21', '2026-10-17 12:07:21');

-- --------------------------------------------------------

--
-- Table structure for table `outbound_webhook_logs`
--

CREATE TABLE `outbound_webhook_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `destination_service` varchar(255) NOT NULL,
  `event` varchar(255) NOT NULL,
  `reference_id` bigint(20) UNSIGNED NOT NULL,
  `target_url` varchar(255) NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`payload`)),
  `http_status` int(11) DEFAULT NULL,
  `response_body` text DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'sent',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `packages`
--

CREATE TABLE `packages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `booking_id` bigint(20) UNSIGNED DEFAULT NULL,
  `gateway` varchar(255) NOT NULL DEFAULT 'cash',
  `gateway_ref` varchar(255) DEFAULT NULL,
  `amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `currency` varchar(10) NOT NULL DEFAULT 'PKR',
  `method` varchar(50) NOT NULL DEFAULT 'cash',
  `status` varchar(50) NOT NULL DEFAULT 'completed',
  `receipt_url` text DEFAULT NULL,
  `cashier_shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `payments`
--

INSERT INTO `payments` (`id`, `tenant_id`, `customer_id`, `booking_id`, `gateway`, `gateway_ref`, `amount`, `currency`, `method`, `status`, `receipt_url`, `cashier_shift_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 'PayFast', 'PF-TXN-984210', 4500.00, 'PKR', 'Debit/Credit Card', 'paid', NULL, NULL, '2026-10-17 09:42:01', '2026-10-17 09:42:01'),
(2, 1, 1, 2, 'Stripe', 'STRIPE-CH-481903', 6000.00, 'PKR', 'MasterCard', 'paid', NULL, NULL, '2026-10-17 11:42:01', '2026-10-17 11:42:01'),
(3, 1, 1, 3, 'PayFast', 'PF-TXN-984255', 3000.00, 'PKR', 'EasyPaisa Mobile', 'paid', NULL, NULL, '2026-10-17 13:42:01', '2026-10-17 13:42:01');

-- --------------------------------------------------------

--
-- Table structure for table `payment_webhook_events`
--

CREATE TABLE `payment_webhook_events` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `gateway_name` varchar(50) NOT NULL,
  `event_id` varchar(150) NOT NULL,
  `idempotency_key` varchar(150) NOT NULL,
  `status` varchar(30) NOT NULL DEFAULT 'processed',
  `amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `currency` varchar(10) NOT NULL DEFAULT 'PKR',
  `booking_id` bigint(20) UNSIGNED DEFAULT NULL,
  `pos_sale_id` bigint(20) UNSIGNED DEFAULT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`payload`)),
  `response_summary` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`response_summary`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `payroll_runs`
--

CREATE TABLE `payroll_runs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `month_year` varchar(20) NOT NULL,
  `total_amount` decimal(14,2) NOT NULL DEFAULT 0.00,
  `employee_count` int(11) NOT NULL DEFAULT 0,
  `status` varchar(20) NOT NULL DEFAULT 'completed',
  `processed_date` date DEFAULT NULL,
  `processed_by` bigint(20) UNSIGNED DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(255) DEFAULT NULL,
  `module` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `display_name`, `module`, `created_at`, `updated_at`) VALUES
(1, 'view_dashboard', 'View Executive Dashboard', 'core', '2026-10-17 12:12:28', '2026-10-17 12:12:28'),
(2, 'manage_bookings', 'Create & Edit Bookings', 'bookings', '2026-10-17 12:12:28', '2026-10-17 12:12:28'),
(3, 'pos_checkout', 'Operate POS Register', 'pos', '2026-10-17 12:12:28', '2026-10-17 12:12:28'),
(4, 'manage_finance', 'View Bank Accounts & GL', 'finance', '2026-10-17 12:12:28', '2026-10-17 12:12:28'),
(5, 'manage_inventory', 'Manage Inventory Stock', 'inventory', '2026-10-17 12:12:28', '2026-10-17 12:12:28'),
(6, 'manage_tournaments', 'Create & Score Tournaments', 'tournaments', '2026-10-17 12:12:28', '2026-10-17 12:12:28'),
(7, 'manage_team', 'Invite & Manage Team Users', 'team', '2026-10-17 12:12:28', '2026-10-17 12:12:28');

-- --------------------------------------------------------

--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tokenable_type` varchar(255) NOT NULL,
  `tokenable_id` bigint(20) UNSIGNED NOT NULL,
  `name` text NOT NULL,
  `token` varchar(64) NOT NULL,
  `abilities` text DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `players`
--

CREATE TABLE `players` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `nationality` varchar(255) DEFAULT NULL,
  `avatar_url` varchar(255) DEFAULT NULL,
  `verification_status` varchar(255) NOT NULL DEFAULT 'unverified',
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `privacy_settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`privacy_settings`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `players`
--

INSERT INTO `players` (`id`, `tenant_id`, `user_id`, `name`, `phone`, `email`, `gender`, `dob`, `city`, `nationality`, `avatar_url`, `verification_status`, `status`, `privacy_settings`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, NULL, 'Babar Azam', '03001112233', NULL, NULL, NULL, NULL, NULL, NULL, 'unverified', 'active', NULL, '2026-10-17 13:42:56', '2026-10-17 13:42:56', NULL),
(2, 1, NULL, 'Babar Azam', '03001112233', NULL, NULL, NULL, NULL, NULL, NULL, 'unverified', 'active', NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', NULL),
(3, 1, NULL, 'Shaheen Afridi', '03002223344', NULL, NULL, NULL, NULL, NULL, NULL, 'unverified', 'active', NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', NULL),
(4, 1, NULL, 'Mohammad Rizwan', '03003334455', NULL, NULL, NULL, NULL, NULL, NULL, 'unverified', 'active', NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', NULL),
(5, 1, NULL, 'Faris Ali', '03004445566', NULL, NULL, NULL, NULL, NULL, NULL, 'unverified', 'active', NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', NULL),
(6, 1, NULL, 'Zayd Khan', '03005556677', NULL, NULL, NULL, NULL, NULL, NULL, 'unverified', 'active', NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', NULL),
(7, 1, NULL, 'Hamza Tariq', '03006667788', NULL, NULL, NULL, NULL, NULL, NULL, 'unverified', 'active', NULL, '2026-10-17 13:43:27', '2026-10-17 13:43:27', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `player_elo_ratings`
--

CREATE TABLE `player_elo_ratings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `player_id` bigint(20) UNSIGNED DEFAULT NULL,
  `player_name` varchar(255) NOT NULL,
  `sport` varchar(50) NOT NULL DEFAULT 'Padel Tennis',
  `current_elo` int(11) NOT NULL DEFAULT 1200,
  `matches_played` int(11) NOT NULL DEFAULT 0,
  `matches_won` int(11) NOT NULL DEFAULT 0,
  `matches_lost` int(11) NOT NULL DEFAULT 0,
  `win_rate` decimal(5,2) NOT NULL DEFAULT 0.00,
  `rank_tier` varchar(50) NOT NULL DEFAULT 'Silver',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `player_elo_ratings`
--

INSERT INTO `player_elo_ratings` (`id`, `tenant_id`, `player_id`, `player_name`, `sport`, `current_elo`, `matches_played`, `matches_won`, `matches_lost`, `win_rate`, `rank_tier`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'Farhan Qureshi', 'Padel Tennis', 1840, 34, 28, 6, 82.35, 'Diamond', '2026-10-17 16:28:23', '2026-10-17 16:28:23'),
(2, 1, NULL, 'Ahmed Raza', 'Padel Tennis', 1620, 26, 19, 7, 73.08, 'Platinum', '2026-10-17 16:28:23', '2026-10-17 16:28:23'),
(3, 1, NULL, 'Zayd Malik', 'Badminton', 1410, 18, 11, 7, 61.11, 'Gold', '2026-10-17 16:28:23', '2026-10-17 16:28:23'),
(4, 1, NULL, 'Omer Siddiqui', 'Padel Tennis', 1250, 10, 5, 5, 50.00, 'Silver', '2026-10-17 16:28:23', '2026-10-17 16:28:23');

-- --------------------------------------------------------

--
-- Table structure for table `player_milestone_badges`
--

CREATE TABLE `player_milestone_badges` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `player_id` bigint(20) UNSIGNED DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `badge_code` varchar(50) NOT NULL,
  `title` varchar(100) NOT NULL,
  `sport_type` varchar(50) NOT NULL,
  `icon` varchar(20) NOT NULL DEFAULT '?',
  `points_reward` int(11) NOT NULL DEFAULT 250,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `player_notifications`
--

CREATE TABLE `player_notifications` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `phone` varchar(30) NOT NULL,
  `player_name` varchar(100) DEFAULT NULL,
  `channel` varchar(30) NOT NULL DEFAULT 'whatsapp',
  `message` text NOT NULL,
  `status` varchar(30) NOT NULL DEFAULT 'sent',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `player_profiles`
--

CREATE TABLE `player_profiles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `player_id` bigint(20) UNSIGNED NOT NULL,
  `sport_id` bigint(20) UNSIGNED NOT NULL,
  `cricket_role` varchar(255) DEFAULT NULL,
  `batting_style` varchar(255) DEFAULT NULL,
  `bowling_style` varchar(255) DEFAULT NULL,
  `preferred_position` varchar(255) DEFAULT NULL,
  `padel_side` varchar(255) DEFAULT NULL,
  `padel_playing_hand` varchar(255) DEFAULT NULL,
  `padel_level` varchar(255) DEFAULT NULL,
  `bio` text DEFAULT NULL,
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `player_ratings`
--

CREATE TABLE `player_ratings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `player_id` bigint(20) UNSIGNED NOT NULL,
  `sport_id` bigint(20) UNSIGNED NOT NULL,
  `game_type_id` bigint(20) UNSIGNED DEFAULT NULL,
  `current_elo` int(11) NOT NULL DEFAULT 1200,
  `peak_elo` int(11) NOT NULL DEFAULT 1200,
  `matches_played` int(11) NOT NULL DEFAULT 0,
  `wins` int(11) NOT NULL DEFAULT 0,
  `losses` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `pos_printer_templates`
--

CREATE TABLE `pos_printer_templates` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `printer_name` varchar(255) NOT NULL DEFAULT 'Main Counter Thermal 80mm',
  `paper_size` varchar(20) NOT NULL DEFAULT '80mm',
  `header_business_name` varchar(255) NOT NULL DEFAULT 'GAMING ARENA',
  `header_tagline` varchar(255) NOT NULL DEFAULT 'Luxury Padel & Sports Club',
  `footer_thank_you` varchar(255) NOT NULL DEFAULT 'Thank you for playing at Gaming Arena! See you on court.',
  `show_tax_ntn` tinyint(1) NOT NULL DEFAULT 1,
  `ntn_number` varchar(50) NOT NULL DEFAULT 'NTN: 8847291-3',
  `show_wifi_code` tinyint(1) NOT NULL DEFAULT 1,
  `wifi_access_info` varchar(100) NOT NULL DEFAULT 'Guest WiFi: GamingArena_Guest | Pass: Smash2026',
  `auto_print_on_checkout` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pos_printer_templates`
--

INSERT INTO `pos_printer_templates` (`id`, `tenant_id`, `printer_name`, `paper_size`, `header_business_name`, `header_tagline`, `footer_thank_you`, `show_tax_ntn`, `ntn_number`, `show_wifi_code`, `wifi_access_info`, `auto_print_on_checkout`, `created_at`, `updated_at`) VALUES
(1, 1, 'Main Front-Desk Epson TM-T88VI (80mm)', '80mm', 'GAMING ARENA', 'Luxury Padel & Sports Club', 'Thank you for playing at Gaming Arena! Have a great match.', 1, 'NTN: 8847291-3 | PRA Registered', 1, 'Guest WiFi: GamingArena_VIP | Pass: Padel2026', 1, '2026-10-17 16:51:49', '2026-10-17 16:51:49');

-- --------------------------------------------------------

--
-- Table structure for table `properties`
--

CREATE TABLE `properties` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `total_units` int(11) NOT NULL DEFAULT 0,
  `cam_rate_per_sqft` decimal(10,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `properties`
--

INSERT INTO `properties` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `address`, `city`, `total_units`, `cam_rate_per_sqft`) VALUES
(1, 1, NULL, NULL, NULL, 'Gaming Arena & Sports City Complex', NULL, 'active', 'Commercial Complex', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 'Plot 42-B, Sector 5, Sports Boulevard', 'Lahore', 8, 45.00),
(2, 1, NULL, NULL, NULL, 'Gaming Arena Central Club & Food Courtyard', NULL, 'active', 'Commercial Mall / Plaza', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', '12 Commercial Avenue, Phase 6 DHA', 'Lahore', 6, 60.00);

-- --------------------------------------------------------

--
-- Table structure for table `property_renters`
--

CREATE TABLE `property_renters` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `rep_name` varchar(255) DEFAULT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `business_type` varchar(255) DEFAULT NULL,
  `contact_phone` varchar(255) DEFAULT NULL,
  `contact_email` varchar(255) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `property_renters`
--

INSERT INTO `property_renters` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `rep_name`, `company_name`, `business_type`, `contact_phone`, `contact_email`, `phone`) VALUES
(1, 1, NULL, NULL, NULL, NULL, NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'hamza@fitbites.pk', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 'Hamza Tariq', 'FitBites Café & Nutrition', 'Restaurant & Café', '+92 300 8472910', 'hamza@fitbites.pk', '+92 300 8472910'),
(2, 1, NULL, NULL, NULL, NULL, NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'salman@acepro.com', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 'Salman Rasheed', 'Ace Tennis & Padel Pro Equipment', 'Sports Equipment Retail', '+92 321 4455667', 'salman@acepro.com', '+92 321 4455667'),
(3, 1, NULL, NULL, NULL, NULL, NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'zeeshan@dugout.pk', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 'Zeeshan Malik', 'The Dugout Sports Bar & Grill', 'Full Service Restaurant', '+92 333 9988776', 'zeeshan@dugout.pk', '+92 333 9988776');

-- --------------------------------------------------------

--
-- Table structure for table `purchase_orders`
--

CREATE TABLE `purchase_orders` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `po_number` varchar(255) DEFAULT NULL,
  `order_date` date DEFAULT NULL,
  `expected_date` date DEFAULT NULL,
  `received_date` date DEFAULT NULL,
  `paid_amount` decimal(12,2) DEFAULT 0.00,
  `total_amount` decimal(14,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `purchase_orders`
--

INSERT INTO `purchase_orders` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `po_number`, `order_date`, `expected_date`, `received_date`, `paid_amount`, `total_amount`) VALUES
(1, 1, 1, NULL, NULL, NULL, '50 Padel Rackets and 200 Pro Balls', 'received', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'paid', NULL, NULL, '2026-10-05 18:28:33', '2026-10-13 18:28:33', 'PO-2026-001', '2026-10-05', '2026-10-12', '2026-10-13', 180000.00, 180000.00),
(2, 1, 2, NULL, NULL, NULL, 'Match grade leather cricket balls and safety nets', 'received', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'unpaid', NULL, NULL, '2026-10-02 18:28:33', '2026-10-09 18:28:33', 'PO-2026-002', '2026-10-02', '2026-10-07', '2026-10-09', 0.00, 95000.00),
(3, 1, 3, NULL, NULL, NULL, 'Cold brew, electrolyte powders, energy bars bulk order', 'received', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'unpaid', NULL, NULL, '2026-09-02 18:28:33', '2026-09-09 18:28:33', 'PO-2026-003', '2026-09-02', '2026-09-07', '2026-09-09', 0.00, 64000.00);

-- --------------------------------------------------------

--
-- Table structure for table `racket_stringing_jobs`
--

CREATE TABLE `racket_stringing_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `job_ticket_number` varchar(50) NOT NULL,
  `customer_name` varchar(255) NOT NULL,
  `customer_phone` varchar(255) NOT NULL,
  `racket_brand_model` varchar(255) NOT NULL,
  `string_type` varchar(255) NOT NULL,
  `tension_lbs` varchar(30) NOT NULL,
  `cost_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `assigned_stringer` varchar(255) DEFAULT NULL,
  `status` varchar(30) NOT NULL DEFAULT 'queued',
  `completed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `racket_stringing_jobs`
--

INSERT INTO `racket_stringing_jobs` (`id`, `tenant_id`, `job_ticket_number`, `customer_name`, `customer_phone`, `racket_brand_model`, `string_type`, `tension_lbs`, `cost_amount`, `assigned_stringer`, `status`, `completed_at`, `created_at`, `updated_at`) VALUES
(1, 1, 'STR-1001', 'Daniyal Ahmed', '+92 300 1234567', 'Wilson Blade 98 (16x19)', 'Luxilon ALU Power Rough', '54 lbs', 4500.00, 'Master Stringer Rafiq', 'ready_for_pickup', '2026-10-17 14:39:46', '2026-10-16 16:39:46', '2026-10-17 14:39:46'),
(2, 1, 'STR-1002', 'Farhan Qureshi', '+92 321 9876543', 'Yonex Astrox 100 ZZ', 'Yonex Aerobite Boost Hybrid', '28 lbs', 3800.00, 'Master Stringer Rafiq', 'in_progress', NULL, '2026-10-17 12:39:46', '2026-10-17 16:39:46');

-- --------------------------------------------------------

--
-- Table structure for table `referee_match_scores`
--

CREATE TABLE `referee_match_scores` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `match_code` varchar(50) NOT NULL,
  `referee_name` varchar(255) NOT NULL,
  `court_name` varchar(255) NOT NULL,
  `team_a` varchar(255) NOT NULL,
  `team_b` varchar(255) NOT NULL,
  `current_game_score` varchar(20) NOT NULL DEFAULT '40-30',
  `current_set_score` varchar(20) NOT NULL DEFAULT '5-4',
  `server_indicator` varchar(100) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `referee_match_scores`
--

INSERT INTO `referee_match_scores` (`id`, `tenant_id`, `match_code`, `referee_name`, `court_name`, `team_a`, `team_b`, `current_game_score`, `current_set_score`, `server_indicator`, `created_at`, `updated_at`) VALUES
(1, 1, 'FINAL-PADEL-01', 'Official Umpire Sohail', 'Center Court (Live Broadcast)', 'Farhan Qureshi & Ahmed Raza', 'Zayd Malik & Omer Siddiqui', '40-30', '5-4', 'Farhan Qureshi (Serving for Match)', '2026-10-17 16:40:39', '2026-10-17 16:40:39');

-- --------------------------------------------------------

--
-- Table structure for table `renters`
--

CREATE TABLE `renters` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rent_invoices`
--

CREATE TABLE `rent_invoices` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `lease_id` int(11) DEFAULT 0,
  `renter_id` int(11) DEFAULT 0,
  `period_start` date DEFAULT NULL,
  `period_end` date DEFAULT NULL,
  `paid_date` date DEFAULT NULL,
  `late_fine` decimal(10,2) DEFAULT 0.00,
  `month` int(11) DEFAULT NULL,
  `year` int(11) DEFAULT NULL,
  `billing_period` varchar(50) DEFAULT NULL,
  `invoice_type` varchar(50) NOT NULL DEFAULT 'rent'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `rent_invoices`
--

INSERT INTO `rent_invoices` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `lease_id`, `renter_id`, `period_start`, `period_end`, `paid_date`, `late_fine`, `month`, `year`, `billing_period`, `invoice_type`) VALUES
(1, 1, NULL, NULL, NULL, NULL, NULL, 'paid', NULL, 'RINV-202610-101', NULL, '2026-10-25 00:00:00', NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 102000.00, NULL, '2026-10-15 14:24:05', '2026-10-17 14:24:05', 1, 1, NULL, NULL, '2026-10-17', 0.00, 10, 2026, 'October 2026', 'revenue_share_rent'),
(2, 1, NULL, NULL, NULL, NULL, NULL, 'unpaid', NULL, 'RINV-202610-102', NULL, '2026-10-28 00:00:00', NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 65000.00, NULL, '2026-10-16 14:24:05', '2026-10-17 14:24:05', 2, 2, NULL, NULL, NULL, 0.00, 10, 2026, 'October 2026', 'fixed_rent'),
(3, 1, NULL, NULL, NULL, NULL, NULL, 'unpaid', NULL, 'RINV-202610-103', NULL, '2026-10-31 00:00:00', NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 234500.00, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 3, 3, NULL, NULL, NULL, 0.00, 10, 2026, 'October 2026', 'revenue_share_rent');

-- --------------------------------------------------------

--
-- Table structure for table `rent_payments`
--

CREATE TABLE `rent_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `reports`
--

CREATE TABLE `reports` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `restaurant_sales_reports`
--

CREATE TABLE `restaurant_sales_reports` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `lease_id` bigint(20) UNSIGNED NOT NULL,
  `restaurant_name` varchar(255) NOT NULL,
  `external_pos_reference` varchar(255) DEFAULT NULL,
  `gross_sales` decimal(14,2) NOT NULL,
  `net_sales` decimal(14,2) DEFAULT NULL,
  `tax_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `calculated_rent` decimal(12,2) NOT NULL DEFAULT 0.00,
  `applied_slab_id` bigint(20) UNSIGNED DEFAULT NULL,
  `reporting_period_start` date NOT NULL,
  `reporting_period_end` date NOT NULL,
  `generated_invoice_id` bigint(20) UNSIGNED DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'processed',
  `payload_snapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`payload_snapshot`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `restaurant_sales_reports`
--

INSERT INTO `restaurant_sales_reports` (`id`, `tenant_id`, `lease_id`, `restaurant_name`, `external_pos_reference`, `gross_sales`, `net_sales`, `tax_amount`, `calculated_rent`, `applied_slab_id`, `reporting_period_start`, `reporting_period_end`, `generated_invoice_id`, `status`, `payload_snapshot`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'FitBites Café & Nutrition', 'FITBITES-OCT-01', 1120000.00, 973913.04, 146086.96, 102000.00, NULL, '2026-10-01', '2026-10-15', 1, 'processed', '{\"pos_terminal\":\"FB-POS-1\",\"sync_mode\":\"api_push\"}', '2026-10-15 14:24:05', '2026-10-15 14:24:05'),
(2, 1, 3, 'The Dugout Sports Bar & Grill', 'DUGOUT-OCT-FEED-2', 2450000.00, 2130434.78, 319565.22, 234500.00, NULL, '2026-10-01', '2026-10-17', 3, 'processed', '{\"pos_terminal\":\"DUGOUT-SVR-MAIN\",\"sync_mode\":\"api_push\"}', '2026-10-17 14:24:05', '2026-10-17 14:24:05');

-- --------------------------------------------------------

--
-- Table structure for table `revenue_share_slabs`
--

CREATE TABLE `revenue_share_slabs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `lease_id` bigint(20) UNSIGNED NOT NULL,
  `slab_name` varchar(255) DEFAULT NULL,
  `from_amount` decimal(12,2) NOT NULL DEFAULT 0.00,
  `to_amount` decimal(12,2) DEFAULT NULL,
  `percentage_rate` decimal(5,2) NOT NULL DEFAULT 5.00,
  `min_base_rent` decimal(12,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `revenue_share_slabs`
--

INSERT INTO `revenue_share_slabs` (`id`, `tenant_id`, `lease_id`, `slab_name`, `from_amount`, `to_amount`, `percentage_rate`, `min_base_rent`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Tier 1 (Base Sales)', 0.00, 500000.00, 8.00, 50000.00, '2026-10-17 14:24:05', '2026-10-17 14:24:05'),
(2, 1, 1, 'Tier 2 (Growth Sales)', 500000.00, 1500000.00, 10.00, 50000.00, '2026-10-17 14:24:05', '2026-10-17 14:24:05'),
(3, 1, 1, 'Tier 3 (Super Peak)', 1500000.00, NULL, 12.50, 50000.00, '2026-10-17 14:24:05', '2026-10-17 14:24:05'),
(4, 1, 3, 'Tier 1 Standard', 0.00, 1000000.00, 7.50, 120000.00, '2026-10-17 14:24:05', '2026-10-17 14:24:05'),
(5, 1, 3, 'Tier 2 Peak High Volume', 1000000.00, NULL, 11.00, 120000.00, '2026-10-17 14:24:05', '2026-10-17 14:24:05');

-- --------------------------------------------------------

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`permissions`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `display_name`, `description`, `permissions`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'Administrator', 'Full administrative access', NULL, '2026-10-17 12:08:58', '2026-10-17 12:08:58'),
(2, 'manager', 'Arena Manager', 'Operational and bookings manager', NULL, '2026-10-17 12:08:58', '2026-10-17 12:08:58'),
(3, 'cashier', 'POS Cashier', 'Front-desk point of sale and cash till operator', NULL, '2026-10-17 12:08:58', '2026-10-17 12:08:58');

-- --------------------------------------------------------

--
-- Table structure for table `role_permissions`
--

CREATE TABLE `role_permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `role` varchar(255) NOT NULL,
  `permission` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('0f5QhnOyRjJCpsHuz8sy6GdYRn7uAQswjPvRd6kC', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiNWJQb3NYWmdzanh6UmF5YnVlT2dTZW9BSEhFVk8xRzVXNXhDWHo5YyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mzc6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL3JlcG9ydHMiO3M6NToicm91dGUiO3M6MTU6ImNvbnNvbGUucmVwb3J0cyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792281600),
('6XvQmNpDj5n7kpCeFmwJDyrO5yPAvBuxgkCpoXv2', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoid0RBbHhmTG9Db2s1Rkx4U0VEN0J4RlNxS1VCcUo2aHQxMktZWGlzViI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzI6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9yZXBvcnRzIjtzOjU6InJvdXRlIjtzOjE1OiJjb25zb2xlLnJlcG9ydHMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792281114),
('8zjO2iQJMtnmdLmoZvkMdRxhDrlopFVDyfMLtJ45', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZlQ0NEthdmpZbFZ4czdSVDJFRjIyQXNaWmNRQW5HZXV6Mk5UbVVRcCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzM6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2NtcyI7czo1OiJyb3V0ZSI7czoxMToiY29uc29sZS5jbXMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792285513),
('99JJXfZSdz5kIrD9jj2scLUf2cnNspl4pgbiyZab', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiemdYdUlsS3QwdEdBRW93a0tjRDl4M2pObzdCeDVtU3A4ZjJMcUI0bCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDI6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9hcHAvbW9iaWxlLXBvcnRhbCI7czo1OiJyb3V0ZSI7czoyNToiY29uc29sZS5hcHAubW9iaWxlLXBvcnRhbCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792274740),
('9ChUCMyKcHoz5qhCaccSBvaIeVMyOQ8L9ehiCUnX', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiMVIyZUhVQXVRMERiY3lKSHZKNEtweG93REM5Q0Y2VWVlQXRlREN6QyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDI6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9hcHAvbW9iaWxlLXBvcnRhbCI7czo1OiJyb3V0ZSI7czoyNToiY29uc29sZS5hcHAubW9iaWxlLXBvcnRhbCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792274713),
('9SigrpbCr9UmoFuhjABJofEf7EQpSG9GI7R9s0ON', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiRjJjYWJXQXcwR0JOajliTGNDa1ZqRHQ5T3dUblVNQ1VtMnd4c1h0ZSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mzg6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2Jvb2tpbmdzIjtzOjU6InJvdXRlIjtzOjE2OiJjb25zb2xlLmJvb2tpbmdzIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1792286295),
('9U6lBjAtyPHZ7HSXnQE6tpWGsx3VCewur9qzH35G', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiMjYxUG5rRnBqSFVRTUNsTXlNc3dBQjZQSDNwNmV0OVlWSG1sOXZlYSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9maW5hbmNlL2J1ZGdldHMiO3M6NToicm91dGUiO3M6MjM6ImNvbnNvbGUuZmluYW5jZS5idWRnZXRzIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1792280688),
('A4ss0Mn1yeBttD5VKCdFYFWKLDu6KihNLEHgwAns', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoia2o4Zm9nak9uVlFXUmlJNEpBdjd1N21TS2RPN0trNGNZWWczbFJrdiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzM6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL3BvcyI7czo1OiJyb3V0ZSI7czoxMToiY29uc29sZS5wb3MiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792286293),
('aDzISVNVyo6JClcSO56QWPcipgTBs0eKvTdcUXwp', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiSUdsYWZIWlNTdjF5NWpzSzBQblZVWVJvTUJhdGZOS2ZBTGZESkIxbCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzM6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9jb25zb2xlL2NtcyI7czo1OiJyb3V0ZSI7czoxMToiY29uc29sZS5jbXMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792287408),
('C811ieTqhCesluLgsUfxEHpnL3CUy510hUC0bDGc', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiTGtSaXRJYUJnMXExN0ZyVkVLZHJHWGlyY0JjN2J6TjJyOEg0MHFFMCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792282290),
('eQ0CjZDplH84zwuwb4SHr6yJ3tyA8uLC9my00UxG', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiMGF1c1ZJMkRGb2RUclRHSGV3RHltc1hEaTRRQklzZHFPTkF4ZnFGZSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7czo5OiJzaXRlLmhvbWUiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792286296),
('EQijpQN5vVHXVFjbl4hV5AelB01WkbWVXOSG8i5V', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiMTI2RWpRRmxtbEEwdVRjRmttaUc3QXZwc1BOSHNPOVJVZjFmZVJSNCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzI6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9yZXBvcnRzIjtzOjU6InJvdXRlIjtzOjE1OiJjb25zb2xlLnJlcG9ydHMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792280826),
('eWyZkR81sv2G3173ZuYxNbxuHBR0JxXVHaIR6E2A', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiN0VHZmFiT05rZFZDQ1lGZG9qdVJnWUN2MU91WEdzMlhOa0tvaTEwbyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9maW5hbmNlL2J1ZGdldHMiO3M6NToicm91dGUiO3M6MjM6ImNvbnNvbGUuZmluYW5jZS5idWRnZXRzIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1792280507),
('eYjN2ecmEhG5fg322ogHGcec5bBYWJb7NX5qMAv9', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZmxFcDM0WFV6SnBYQXphVTBaQ0U4MHphZzYzUXRESEhrNlZMOHkwcSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDY6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ludmVudG9yeS9hc3NldHMiO3M6NToicm91dGUiO3M6MjQ6ImNvbnNvbGUuaW52ZW50b3J5LmFzc2V0cyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792284229),
('gDvivhU10A4NPi1IKTPESDpSyeFYS4B8RdB1NKk1', NULL, '127.0.0.1', '', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoicU9oNFpielNvcHhwWU1MR2lHSHlsS0E2Vm1jUDZqWnhkU21QaHVQdyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792282572),
('HennIzr5aRUpfzqs4aCkUXCVXRLMoxmAEuwpSXgN', NULL, '127.0.0.1', '', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoidWNLc1p1RTJ2OVI4a01wOGsxMER3S0p5eWtCQ0VQWjhZT3dQcVViayI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792283119),
('HKSu15cZdp4XhCvpSuk11ZvUL2HxAf2QFI1oz5Q5', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiVEpPMGtRY1pyRnVLRjJkYmI2MVVMVGhrSzVRN2FvMGpMZzRuTEc1cCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDY6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ludmVudG9yeS9hc3NldHMiO3M6NToicm91dGUiO3M6MjQ6ImNvbnNvbGUuaW52ZW50b3J5LmFzc2V0cyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792283972),
('jHEQFezq0nELmdR7WQ7UNnkGrDEIRdnWBiztQpJN', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZmR2bk5ucmRqQjg2MHh5emNtbzY3ekhLRkxhSUI3OUZzelZLQ2pjOSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7czo5OiJzaXRlLmhvbWUiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792285541),
('JhZYwBhAl4n08o2gLeW1CrxywMYQEeexTX1cfRVR', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoibDk0YzlxWXl5blhxS1F0Tm5DZTNHS1NZQ2l6bUNQOFpIcUk2UHFqTiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mzg6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2Jvb2tpbmdzIjtzOjU6InJvdXRlIjtzOjE2OiJjb25zb2xlLmJvb2tpbmdzIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1792286415),
('JObSPMiJWpRbhB9m5ihax0a9rLAhZzltRO8uHb4N', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZHhRNk1UVHdJa3BZN2VETzl1TURFa1lnUkY4Q2dpVmF3dVY1dGRqUiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDQ6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9yZXBvcnRzL3Byb2ZpdC1sb3NzIjtzOjU6InJvdXRlIjtzOjI3OiJjb25zb2xlLnJlcG9ydHMucHJvZml0LWxvc3MiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792280251),
('juq7J0HPIaZKmHXQc3s2RF5B3qoEkXXWmpRy5Egw', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiVzVnRmZYY0ttekhvTHJYZk1WbndSblp2T1RaRGptN21CTlVxMVNHSCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792282198),
('jv8ijibg4tH3qdwtxAkui9PXTrRwmBx29lvozL1I', NULL, '127.0.0.1', '', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiMXhTbnozNVNOM3VCbm1EaWp3cldIcENjRkY1TWlXSTNjRm51RlpUSSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792282558),
('l4UE8sVf331tWsY9Ave3U0XzJt37Sq33ONLxbNYa', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiRGxTYU1DYm9OMTJaR1hwUHJPR2lkeXpxZkZBNGNocjlkQ2lPcGVTTCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7czo5OiJzaXRlLmhvbWUiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792286416),
('lPPuIw9ZywW6UcAZqMbwhqFnfVN3jmskr9Y6fywS', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoib3RSOHpmaW9BZVE5eVVteE9GTnU5emtpNmlHRmFPRG5uRW5rVjJHUyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDY6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ludmVudG9yeS9hc3NldHMiO3M6NToicm91dGUiO3M6MjQ6ImNvbnNvbGUuaW52ZW50b3J5LmFzc2V0cyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792286295),
('m2Vqn3gqjZLTJ2laGSGduFmXlCC3fxpU3eu71BdR', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiRThndDZzcklyTHFFY0VNSmVFYzNRbmFCSVBoQ1dQTXZKMmJwUENFNyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzM6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2NtcyI7czo1OiJyb3V0ZSI7czoxMToiY29uc29sZS5jbXMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792286416),
('M2YJm5X3LkoaXDQhNGyOAJf9lwiPaSp5QfixWE8k', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiVDZuRU5jNE5WUHJGZlR1b2ppeDM2b2dwZnp3RXZrdmhjMkY5aGdjVCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792283335),
('M8MX2Oz90H2Peh2a66jukcFeHpQI97Oiysa86l37', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiZHVvTVFsbXp2d2hYb1ZnVWwzM0xlUWc1a09sbEozVjRsa1N4cEVyUSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzM6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2NtcyI7czo1OiJyb3V0ZSI7czoxMToiY29uc29sZS5jbXMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792286296),
('mXLb0StLOQs7LfyrekdcI9AmqRMYjrcYPMQlpWaH', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoicnV2UkRaZWY5MGtZcWt0WkZDRjFlUUlzUUEzNWh4SnZ0RjR4VFpjSyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7czo5OiJzaXRlLmhvbWUiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792285524),
('NgWpTCzSS4VU6lsTsWJkHetY0gO2T8doewTxelnh', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiNzV5VGlWUFhsbzlKZGd6UVBnaHRQUllJamFHWFFsdk9xWDZUVFVXTyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzI6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9maW5hbmNlIjtzOjU6InJvdXRlIjtzOjE1OiJjb25zb2xlLmZpbmFuY2UiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792280818),
('NruJrowqenkk527AQrG3lgSbbgOINbSYd36cDUCK', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiVlJCNXg5eEhHa2hLeG5QcXJJSDQxVVdQSXJObno2b2FkejhXRE5ZdyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzI6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9yZXBvcnRzIjtzOjU6InJvdXRlIjtzOjE1OiJjb25zb2xlLnJlcG9ydHMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792280051),
('Pel2kFidPVWCBTgM7lMzJKObZUOSF4QOONjyyN0y', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiSGZuNlQ1WTNURWVNdGFSYlZkQ29kUjc1T2JZV3VZVjZQNHI4YTZiRiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzI6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9yZXBvcnRzIjtzOjU6InJvdXRlIjtzOjE1OiJjb25zb2xlLnJlcG9ydHMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792280360),
('pqjrq2xDq8FSZznPlVdrPQnqFQBdui70FooiLppi', NULL, '127.0.0.1', '', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoicHlvRktDc2VwZTB6UnpjY1hHTVlLdDJwNlRveXhNVUhQSm9tZ3V4USI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7czo5OiJzaXRlLmhvbWUiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792287810),
('QLelbySAGGxR9Zrmv8efj9d3GVHbQnsT6YwOEA16', NULL, '127.0.0.1', '', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiUFVWSml0R3NLdktUVVpBWWxoSUhIVE8zQjhTNTdBWWlweEZ3MnBtViI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792282565),
('qnzQsxPXCOSf5nr1ZYkIHh5yglIR1SxeGOesEAuW', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiSzFvQmNUOWI0cmxnYTI2QzZLakc3VkttdjV6cWVtSEx0RVJ2QkltNyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzM6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL3BvcyI7czo1OiJyb3V0ZSI7czoxMToiY29uc29sZS5wb3MiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792286414),
('SEeUAFO3MNGoOGU0Pl4F4ZPImYIh1VeXkJbkr0t8', NULL, '127.0.0.1', '', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiM3Y1bk5qbXA5bTVlYjJWSm1LMlc2SDFqYXpPYXNucUtlT25NajVhcyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792282858),
('SniMQ4VSWcN3YUXA6FbOjOyTYenhyiyHcqB2RKmC', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoibWEzVkJGa1pBVnI3cERtdWtnREcyRzlkT00xWExVblYzdlhwVm5oSyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mjk6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9jb25zb2xlIjtzOjU6InJvdXRlIjtzOjE3OiJjb25zb2xlLmRhc2hib2FyZCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792287794),
('tiOGwmgq7f3Qr5wguJYM2gsUNIwKuIn58IO8Ekrf', NULL, '127.0.0.1', '', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiRVV1QjVzR0hTalNEZGRqeEd0RXB0Q2dPaVlWSHF0QkpMS2FOT2dLQSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792282345),
('UUHUIHbkuba0AGcINTds6zcXwBurvucJVyicpfbt', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoia05jZ1lVV0RYemF6SlltV01PUTZxNE8xN0JoclRlSXhKTERoQmRldCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzI6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9maW5hbmNlIjtzOjU6InJvdXRlIjtzOjE1OiJjb25zb2xlLmZpbmFuY2UiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792280779),
('v56MtUkGo4UAFz9lF0K3iBO2Om2loF6JBS9sKjTj', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiaTczUFU2TFo1b01zeWNyNnFLeklQeEZreVJvcEFyejZZNlk1a3pQcSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7czo1OiJyb3V0ZSI7czo5OiJzaXRlLmhvbWUiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792285533),
('vy0RQw0BflvJv9Hv8uQDQaxwLxPl749JVaJZtiRG', NULL, '127.0.0.1', 'curl/8.21.0', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoibDlFbWtCZ1JabVhvaTl2c1NEM0s4NUlsTklMV2NFVUIyM3J0WW85QiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDY6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ludmVudG9yeS9hc3NldHMiO3M6NToicm91dGUiO3M6MjQ6ImNvbnNvbGUuaW52ZW50b3J5LmFzc2V0cyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792286415),
('W2v6ROMXtIWt4xFOyeXkYCwRsN6ueCiYqA7KnNRS', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiVUNsRVVxQzdxOW45SVIxdlJXSmZRNXM3bnRVV3VSejQzTnZwTmppRSI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDQ6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9yZXBvcnRzL3Byb2ZpdC1sb3NzIjtzOjU6InJvdXRlIjtzOjI3OiJjb25zb2xlLnJlcG9ydHMucHJvZml0LWxvc3MiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792280090),
('WsyiW2seZUvKQn1oEMAg8vKL5VgybIEdfDg8edEn', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiejZSbjJKZEdRSlpqWVRSSmJkeG8wUXRGR0k3MUhLNDRLT0ZlSllPSyI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDk6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9oYXJkd2FyZS90dXJuc3RpbGUta2lvc2siO3M6NToicm91dGUiO3M6MzI6ImNvbnNvbGUuaGFyZHdhcmUudHVybnN0aWxlLWtpb3NrIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1792275574),
('ydlCcMBQgQLLBb6nXJelI68NruATw8OXt38u8mXa', NULL, '127.0.0.1', '', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoieDNQblQzWGFaYVFGRjBWbEpGN21mbDF1b21tVmpvYTd1cW9RNXQ3TiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDA6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMC9jb25zb2xlL2ZhY2lsaXRpZXMiO3M6NToicm91dGUiO3M6MTg6ImNvbnNvbGUuZmFjaWxpdGllcyI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1792282782),
('Yo5jM4sY7r5PnI3ZaC7P5rhMqNFIlIW1n1cAD0yR', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoieTQ1THBFV1lGcHVWRE5CckcxTjNmSnhyYjFQcU9FTmZyeW1iOHIwWiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6Mzc6Imh0dHA6Ly9sb2NhbGhvc3QvY3VzdG9tZXIvcGVyZm9ybWFuY2UiO3M6NToicm91dGUiO3M6MjA6ImN1c3RvbWVyLnBlcmZvcm1hbmNlIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1792274247),
('ZlNURJfZcp19DJQpRaFGXhUuwGltCUbna7UApnaE', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiQ3FpWkRVNnlnWlA0R0pjaXA4QkU1Y3pUS2lUSlV5UE1xR3c3cFNNaCI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDQ6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9zY29yaW5nL21hdGNoLWNhcmRzIjtzOjU6InJvdXRlIjtzOjI3OiJjb25zb2xlLnNjb3JpbmcubWF0Y2gtY2FyZHMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792276137),
('zn6oR72HY0BNwHqamZxn3TRGj4JoLmBWvGx4jbi2', NULL, '127.0.0.1', 'Symfony', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiaG02TG8wT3E4WXlJQ0hZZzR4aTV1aDJLVEhlTDN1ckVNRlpTOUc0eiI7czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6MzI6Imh0dHA6Ly9sb2NhbGhvc3QvY29uc29sZS9yZXBvcnRzIjtzOjU6InJvdXRlIjtzOjE1OiJjb25zb2xlLnJlcG9ydHMiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX19', 1792280242);

-- --------------------------------------------------------

--
-- Table structure for table `site_contents`
--

CREATE TABLE `site_contents` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `section` varchar(60) NOT NULL,
  `key` varchar(100) NOT NULL,
  `value` longtext DEFAULT NULL,
  `type` varchar(30) NOT NULL DEFAULT 'text',
  `label` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `site_contents`
--

INSERT INTO `site_contents` (`id`, `section`, `key`, `value`, `type`, `label`, `description`, `created_at`, `updated_at`) VALUES
(1, 'hero', 'hero_badge', '✨ A Premium Multi-Sport & Esports Venue', 'text', 'Hero Pill Badge', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(2, 'hero', 'hero_title_line1', 'Play like the', 'text', 'Hero Title Line 1', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(3, 'hero', 'hero_title_highlight', 'whole city', 'text', 'Hero Title Highlighted Gold Text', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(4, 'hero', 'hero_title_line2', 'is watching.', 'text', 'Hero Title Line 2', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(5, 'hero', 'hero_subtitle', 'Futsal, cricket nets, AI simulators, free-roam VR, padel, and an esports lounge that stays open past midnight — all under one glass-and-gold roof. Book in seconds, walk in with a digital QR pass.', 'textarea', 'Hero Subtitle Description', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(6, 'hero', 'hero_cta_text', 'Book a Slot Now', 'text', 'Primary CTA Button Text', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(7, 'hero', 'hero_cta_url', '/book', 'text', 'Primary CTA Link', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(8, 'announcement', 'announcement_enabled', '1', 'boolean', 'Show Announcement Bar', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(9, 'announcement', 'announcement_text', '🔥 RAMADAN NIGHT LEAGUE 2026 REGISTRATIONS ARE LIVE! USE CODE ARENA20 FOR 20% CASHBACK.', 'text', 'Ticker Announcement Text', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(10, 'announcement', 'announcement_link', '/tournaments', 'text', 'Announcement Click URL', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(11, 'contact', 'contact_phone', '+92 300 1234567', 'text', 'Venue Phone / WhatsApp', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(12, 'contact', 'contact_email', 'play@gamingarena.pk', 'text', 'Official Email', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(13, 'contact', 'contact_address', 'Plot 14-C, Sports District, Phase 8, DHA, Karachi, Pakistan', 'textarea', 'Physical Street Address', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(14, 'contact', 'operating_hours', 'Mon - Sun: 08:00 AM – 03:00 AM PST', 'text', 'Operational Timings', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(15, 'seo', 'seo_meta_title', 'Gaming Arena — Luxury Multi-Sport Arena & Esports Complex | Karachi', 'text', 'Global Meta Title', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(16, 'seo', 'seo_meta_description', 'Karachi premier luxury sports venue featuring panoramic glass padel courts, AI cricket bowling simulators, FIFA-grade turf futsal, free-roam VR rigs, and pro esports lounge. Instant slot booking with QR fast-pass entry.', 'textarea', 'Global Meta Description', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(17, 'seo', 'seo_meta_keywords', 'padel karachi, futsal arena karachi, cricket simulator pakistan, esports lounge, sports venue booking, padel racket stringing, indoor sports complex karachi', 'textarea', 'SEO Meta Keywords', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(18, 'aeo', 'aeo_direct_answer', 'Gaming Arena is Pakistan premier multi-sport arena offering panoramic glass padel courts, FIFA-certified turf futsal, high-speed automated cricket bowling simulators, free-roam VR pods, and esports consoles.', 'textarea', 'AI Overview Direct Summary', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(19, 'aeo', 'aeo_pricing_summary', 'Court bookings range from Rs. 3,500/hr for Padel to Rs. 4,000/hr for Futsal with equipment rentals and instant WhatsApp QR access passes.', 'textarea', 'AI Pricing Summary', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(20, 'aeo', 'aeo_operating_hours', 'Open daily from 08:00 AM to 03:00 AM PST.', 'text', 'AI Operating Timings', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(21, 'geo', 'geo_region', 'PK-SD', 'text', 'GEO Region Code', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(22, 'geo', 'geo_placename', 'Karachi, Sindh, Pakistan', 'text', 'GEO Place Name', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(23, 'geo', 'geo_latitude', '24.8607', 'text', 'Venue Latitude', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(24, 'geo', 'geo_longitude', '67.0011', 'text', 'Venue Longitude', NULL, '2026-10-17 19:56:40', '2026-10-17 19:56:40');

-- --------------------------------------------------------

--
-- Table structure for table `site_faqs`
--

CREATE TABLE `site_faqs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `category` varchar(60) NOT NULL DEFAULT 'General',
  `question` text NOT NULL,
  `answer` longtext NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `site_faqs`
--

INSERT INTO `site_faqs` (`id`, `category`, `question`, `answer`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'Booking & Access', 'How does the digital QR pass work for entry?', 'Once you book any court or simulator online, your digital pass is instantly generated with a unique QR code. You also receive it on WhatsApp. Simply scan this QR code at our automated optical turnstiles to unlock the entry gate.', 1, 1, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(2, 'Equipment & Rentals', 'Can I rent padel rackets and balls at the arena?', 'Yes! We have an on-site Pro Shop offering Head, Babolat, and Bullpadel rackets for rent (Rs. 300/racket) as well as premium pressurized ball cans. We also provide professional electronic racket restringing.', 1, 2, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(3, 'Pricing & Cancellation', 'What is the refund and rescheduling policy?', 'You can cancel or reschedule any booking up to 6 hours before slot commencement for a 100% venue credit wallet refund. Same-day cancellations within 6 hours are eligible for a 50% wallet credit.', 1, 3, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(4, 'Facilities & Timings', 'What are the operating hours and parking facilities?', 'We are open 7 days a week from 08:00 AM to 03:00 AM PST. The venue has secured on-site parking for over 80 vehicles with 24/7 CCTV surveillance and valet assistance.', 1, 4, '2026-10-17 19:56:40', '2026-10-17 19:56:40');

-- --------------------------------------------------------

--
-- Table structure for table `site_galleries`
--

CREATE TABLE `site_galleries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `category` varchar(60) NOT NULL DEFAULT 'general',
  `media_type` varchar(20) NOT NULL DEFAULT 'image',
  `original_path` varchar(255) NOT NULL,
  `compressed_path` varchar(255) DEFAULT NULL,
  `thumbnail_path` varchar(255) DEFAULT NULL,
  `original_size_bytes` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `compressed_size_bytes` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `compression_ratio` double NOT NULL DEFAULT 0,
  `mime_type` varchar(50) DEFAULT NULL,
  `alt_text` varchar(255) DEFAULT NULL,
  `caption` text DEFAULT NULL,
  `geo_tags` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`geo_tags`)),
  `aeo_keywords` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`aeo_keywords`)),
  `is_featured` tinyint(1) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `site_galleries`
--

INSERT INTO `site_galleries` (`id`, `title`, `category`, `media_type`, `original_path`, `compressed_path`, `thumbnail_path`, `original_size_bytes`, `compressed_size_bytes`, `compression_ratio`, `mime_type`, `alt_text`, `caption`, `geo_tags`, `aeo_keywords`, `is_featured`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'Mondo Panoramic Padel Court 1', 'padel', 'image', '/aeropadel22.png', '/aeropadel22.png', '/aeropadel22.png', 450000, 95000, 78.8, 'image/png', 'High definition panoramic glass padel court with LED lighting at Gaming Arena Karachi', 'European-standard 12mm tempered panoramic glass with textured monofilament turf.', '{\"lat\":24.8607,\"lng\":67.0011,\"zone\":\"Padel Court 1\"}', '[\"panoramic padel\",\"padel karachi\",\"best padel court\"]', 1, 1, 1, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(2, 'RoboArm Pro Cricket Simulator', 'cricket', 'image', '/simulator22.png', '/simulator22.png', '/simulator22.png', 620000, 110000, 82.2, 'image/png', 'RoboArm automated cricket bowling simulator with high speed cameras at Gaming Arena', '150 km/h bowling simulator with swing, seam, and 4K ultra-slow-motion replay cameras.', '{\"lat\":24.8607,\"lng\":67.0011,\"zone\":\"Cricket Sim Pod A\"}', '[\"cricket simulator\",\"fast bowling simulator\",\"batting drills\"]', 1, 1, 2, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(3, 'FIFA Quality Pro Futsal Arena', 'futsal', 'image', '/futsal22.png', '/futsal22.png', '/futsal22.png', 540000, 105000, 80.5, 'image/png', 'FIFA certified artificial turf futsal pitch with shock pad underlayment', 'Non-abrasive turf with 500-lux anti-glare floodlights and electronic scoreboards.', '{\"lat\":24.8607,\"lng\":67.0011,\"zone\":\"Futsal Pitch A\"}', '[\"futsal karachi\",\"5v5 football court\",\"indoor soccer\"]', 1, 1, 3, '2026-10-17 19:56:40', '2026-10-17 19:56:40'),
(4, 'Free-Roam VR Haptic Arena', 'vr_gaming', 'image', '/vr22.png', '/vr22.png', '/vr22.png', 710000, 135000, 80.9, 'image/png', 'Multiplayer wireless VR gaming zone with haptic vest feedback', 'Tactical shooters and rhythm games on untethered Meta Quest Pro 3 systems.', '{\"lat\":24.8607,\"lng\":67.0011,\"zone\":\"VR Pod 1\"}', '[\"vr arena karachi\",\"virtual reality gaming\",\"haptic gaming\"]', 1, 1, 4, '2026-10-17 19:56:40', '2026-10-17 19:56:40');

-- --------------------------------------------------------

--
-- Table structure for table `site_testimonials`
--

CREATE TABLE `site_testimonials` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `author_name` varchar(255) NOT NULL,
  `author_role` varchar(255) DEFAULT NULL,
  `sport` varchar(60) DEFAULT NULL,
  `rating` tinyint(4) NOT NULL DEFAULT 5,
  `review_text` text NOT NULL,
  `avatar_url` varchar(255) DEFAULT NULL,
  `is_published` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sports`
--

CREATE TABLE `sports` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `code` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `icon` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`metadata`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sports`
--

INSERT INTO `sports` (`id`, `code`, `name`, `icon`, `is_active`, `metadata`, `created_at`, `updated_at`) VALUES
(1, 'padel', 'Padel Tennis', '🎾', 1, NULL, '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(2, 'cricket', 'Indoor Cricket', '🏏', 1, NULL, '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(3, 'futsal', 'Indoor Futsal', '⚽', 1, NULL, '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(4, 'snooker', 'Pro Snooker', '🎱', 1, NULL, '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(5, 'pool', '8-Ball Pool', '🎱', 1, NULL, '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(6, 'table_tennis', 'Table Tennis', '🏓', 1, NULL, '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(7, 'playstation', 'PS5 Esports', '🎮', 1, NULL, '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(8, 'pc_gaming', 'PC Gaming Arena', '🖥️', 1, NULL, '2026-10-17 05:54:25', '2026-10-17 05:54:25');

-- --------------------------------------------------------

--
-- Table structure for table `sport_rules`
--

CREATE TABLE `sport_rules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sport_type` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `rules_summary` text NOT NULL,
  `rule_items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`rule_items`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sport_rules`
--

INSERT INTO `sport_rules` (`id`, `sport_type`, `title`, `rules_summary`, `rule_items`, `created_at`, `updated_at`) VALUES
(1, 'cricket', 'Indoor & Box Cricket Official Rules', 'Short format fast-paced indoor cricket rules for umpire & scorers.', '[\"Over Format: 6 legal deliveries per over. Maximum 2 overs per bowler in a 6-over match.\",\"Wide & No-Ball: 1 penalty run awarded + 1 extra ball. Batsman cannot be dismissed bowled\\/LBW on a free-hit.\",\"Direct Rebound Roof\\/Net: Ball hitting roof net without touching ground is 2 runs. Ball hitting back net directly on full is 6 runs.\",\"Batting Retirements: In tournament box format, batsman must retire after reaching 30 runs, returning only if all teammates are dismissed.\",\"Strike Swap: Odd runs (1, 3) immediately switch striker and non-striker. End of over switches striker automatically.\"]', '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(2, 'futsal', 'FIFA Indoor Futsal Rules', 'Fast turf soccer regulations covering fouls, cards, and penalties.', '[\"Match Duration: Two 20-minute periods with a 5-minute half-time break.\",\"Accumulated Fouls: 5 cumulative fouls allowed per half per team. From the 6th foul onward, direct penalty kick from the 10m spot without a wall.\",\"Disciplinary Cards: Yellow Card is a formal warning. Two Yellows = Red Card. Direct Red Card results in expulsion; team plays with 4 players for 2 minutes or until opponent scores.\",\"Goalkeeper 4-Second Rule: Goalkeeper cannot possess the ball for more than 4 seconds in their own half.\",\"Kick-Ins: Kick-in must be taken within 4 seconds with the ball placed on the touchline.\"]', '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(3, 'snooker', 'WPBSA Official Snooker & Billiards Rules', 'Standard frame rules, ball values, and foul penalty structures.', '[\"Ball Point Values: Red = 1 pt. Yellow = 2 pts, Green = 3 pts, Brown = 4 pts, Blue = 5 pts, Pink = 6 pts, Black = 7 pts.\",\"Order of Play: Red must be potted first, followed by an nominated color until all 15 reds are cleared, then colors in ascending sequence.\",\"Foul Penalties: Minimum 4 points. If the foul involves Blue (5 pts), Pink (6 pts), or Black (7 pts), the higher value is awarded to the opponent.\",\"Frame Win: Highest points at the end of the frame wins. Best of 3\\/5\\/7 determines the match champion.\"]', '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(4, 'padel', 'FIP Official Padel Tennis Rules', 'Point, game, and set rules for doubles and singles padel play.', '[\"Point Sequence: 0 \\u2794 15 \\u2794 30 \\u2794 40 \\u2794 Game (or Golden Point \\/ Advantage).\",\"Service Rule: Underhand serve bouncing behind the service line and below waist height into the diagonal service box.\",\"Glass & Wire Mesh: Ball must bounce once on court before striking the glass wall. Ball hitting wire mesh directly on the serve is a fault.\",\"Set Structure: A set is won by the first pair to win 6 games with a minimum margin of 2 games. At 6-6, a 7-point tie-break is played.\",\"Individual vs Team Points: In doubles, pair score is recorded for the set, while individual unforced errors and winners can be logged for player ratings.\"]', '2026-10-17 13:25:39', '2026-10-17 13:25:39');

-- --------------------------------------------------------

--
-- Table structure for table `staff_payroll_shifts`
--

CREATE TABLE `staff_payroll_shifts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `staff_name` varchar(255) NOT NULL,
  `role_title` varchar(100) NOT NULL DEFAULT 'Front Desk & Pro Sales',
  `phone` varchar(30) DEFAULT NULL,
  `shift_type` varchar(100) NOT NULL DEFAULT 'Evening Shift (4 PM - 12 AM)',
  `shift_date` date NOT NULL,
  `base_daily_pay` decimal(10,2) NOT NULL DEFAULT 1500.00,
  `is_commission_eligible` tinyint(1) NOT NULL DEFAULT 0,
  `sales_volume` decimal(10,2) NOT NULL DEFAULT 0.00,
  `commission_rate_pct` decimal(5,2) NOT NULL DEFAULT 0.00,
  `commission_earned` decimal(10,2) NOT NULL DEFAULT 0.00,
  `net_payable` decimal(10,2) NOT NULL DEFAULT 1500.00,
  `payment_status` varchar(20) NOT NULL DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `staff_payroll_shifts`
--

INSERT INTO `staff_payroll_shifts` (`id`, `tenant_id`, `staff_name`, `role_title`, `phone`, `shift_type`, `shift_date`, `base_daily_pay`, `is_commission_eligible`, `sales_volume`, `commission_rate_pct`, `commission_earned`, `net_payable`, `payment_status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Bilal Hassan', 'Senior Front Desk & Gear Consultant', '+92 301 2345678', 'Evening Peak (4:00 PM - 12:00 AM)', '2026-10-17', 1800.00, 1, 38500.00, 5.00, 1925.00, 3725.00, 'pending', '2026-10-17 17:14:05', '2026-10-17 17:14:05'),
(2, 1, 'Asim Javed', 'Court Marshal & Maintenance Tech', '+92 333 5544332', 'Night Shift (6:00 PM - 2:00 AM)', '2026-10-17', 1500.00, 0, 0.00, 0.00, 0.00, 1500.00, 'pending', '2026-10-17 17:14:05', '2026-10-17 17:14:05'),
(3, 1, 'Hina Tariq', 'Pro-Shop Sales Specialist', '+92 322 9988776', 'Afternoon Shift (12:00 PM - 8:00 PM)', '2026-10-17', 1600.00, 1, 52000.00, 6.00, 3120.00, 4720.00, 'pending', '2026-10-17 17:14:05', '2026-10-17 17:14:05');

-- --------------------------------------------------------

--
-- Table structure for table `suppliers`
--

CREATE TABLE `suppliers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `contact_person` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `category` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `suppliers`
--

INSERT INTO `suppliers` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `contact_person`, `phone`, `address`, `category`) VALUES
(1, 1, NULL, NULL, NULL, 'Bullpadel & Nox Pakistan Official', NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'tariq@bullpadel.pk', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-08-17 18:28:33', '2026-08-17 18:28:33', 'Tariq Mehmood', '+92-300-8451299', NULL, 'Padel Rackets & Balls'),
(2, 1, NULL, NULL, NULL, 'Kookaburra & CA Sports Gear', NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'sales@ca-sports.pk', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-08-17 18:28:33', '2026-08-17 18:28:33', 'Zubair Butt', '+92-321-4455667', NULL, 'Cricket Turf Equipment'),
(3, 1, NULL, NULL, NULL, 'PowerFit Energy Beverages & Shakes', NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, 'orders@powerfit.pk', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-08-17 18:28:33', '2026-08-17 18:28:33', 'Kamran Shah', '+92-333-7788990', NULL, 'Café & Beverage Inventory');

-- --------------------------------------------------------

--
-- Table structure for table `supplier_payments`
--

CREATE TABLE `supplier_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `supplier_id` bigint(20) UNSIGNED NOT NULL,
  `purchase_order_id` bigint(20) UNSIGNED DEFAULT NULL,
  `amount` decimal(14,2) NOT NULL DEFAULT 0.00,
  `payment_method` varchar(255) NOT NULL DEFAULT 'bank',
  `payment_date` date DEFAULT NULL,
  `reference` varchar(255) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `supplier_payments`
--

INSERT INTO `supplier_payments` (`id`, `tenant_id`, `supplier_id`, `purchase_order_id`, `amount`, `payment_method`, `payment_date`, `reference`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 180000.00, 'bank_transfer', '2026-10-13', 'TXN-BANK-SUP-01', 'Full clearance for Bullpadel shipment', '2026-10-13 18:28:33', '2026-10-13 18:28:33');

-- --------------------------------------------------------

--
-- Table structure for table `support_tickets`
--

CREATE TABLE `support_tickets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `subject` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `category` varchar(255) NOT NULL DEFAULT 'general',
  `priority` varchar(255) NOT NULL DEFAULT 'normal',
  `status` varchar(255) NOT NULL DEFAULT 'open',
  `message` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `support_tickets`
--

INSERT INTO `support_tickets` (`id`, `tenant_id`, `customer_id`, `subject`, `email`, `phone`, `category`, `priority`, `status`, `message`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'Court #2 Night floodlight adjustment request', 'tariq.malik@gmail.com', '+92 300 9876543', 'Court Maintenance', 'high', 'open', 'Angle of northwest floodlight on court 2 creates glare during cross-court smashes.', '2026-10-17 06:19:23', '2026-10-17 06:19:23'),
(2, 1, NULL, 'Corporate booking invoice copy required', 'hr@engro.com', '+92 321 5551234', 'Billing & Invoices', 'normal', 'resolved', 'Please provide digital stamped receipt for Engro inter-departmental padel tournament.', '2026-10-15 06:19:23', '2026-10-17 06:19:23');

-- --------------------------------------------------------

--
-- Table structure for table `surge_pricing_rules`
--

CREATE TABLE `surge_pricing_rules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `rule_name` varchar(100) NOT NULL,
  `day_of_week` varchar(30) NOT NULL DEFAULT 'all',
  `start_time` time NOT NULL,
  `end_time` time NOT NULL,
  `multiplier_percent` decimal(5,2) NOT NULL DEFAULT 20.00,
  `rule_type` varchar(20) NOT NULL DEFAULT 'surge',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `surge_pricing_rules`
--

INSERT INTO `surge_pricing_rules` (`id`, `tenant_id`, `facility_id`, `rule_name`, `day_of_week`, `start_time`, `end_time`, `multiplier_percent`, `rule_type`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'Weekend Prime Evening Surge (+25%)', 'weekend', '18:00:00', '23:30:00', 25.00, 'surge', 1, '2026-10-17 16:15:46', '2026-10-17 16:15:46'),
(2, 1, NULL, 'Weekday Early Bird Discount (-20%)', 'weekday', '07:00:00', '15:00:00', -20.00, 'discount', 1, '2026-10-17 16:15:46', '2026-10-17 16:15:46');

-- --------------------------------------------------------

--
-- Table structure for table `system_backup_vaults`
--

CREATE TABLE `system_backup_vaults` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `backup_filename` varchar(255) NOT NULL,
  `storage_driver` varchar(50) NOT NULL DEFAULT 'AWS S3 Encrypted',
  `backup_type` varchar(30) NOT NULL DEFAULT 'Full Database & Media',
  `file_size_mb` decimal(8,2) NOT NULL DEFAULT 42.50,
  `sha256_checksum` varchar(64) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'verified',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `system_backup_vaults`
--

INSERT INTO `system_backup_vaults` (`id`, `tenant_id`, `backup_filename`, `storage_driver`, `backup_type`, `file_size_mb`, `sha256_checksum`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'gamingarena_prod_vault_2026_10_17_215149.sql.gz', 'AWS S3 (Frankfurt Encrypted)', 'Full Database & Media Snapshot', 48.60, 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'verified', '2026-10-17 12:51:49', '2026-10-17 12:51:49');

-- --------------------------------------------------------

--
-- Table structure for table `tax_rates`
--

CREATE TABLE `tax_rates` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `teams`
--

CREATE TABLE `teams` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `sport_type` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `short_name` varchar(10) DEFAULT NULL,
  `captain_name` varchar(255) DEFAULT NULL,
  `logo_url` varchar(255) DEFAULT NULL,
  `contact_phone` varchar(30) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `teams`
--

INSERT INTO `teams` (`id`, `tenant_id`, `sport_type`, `name`, `short_name`, `captain_name`, `logo_url`, `contact_phone`, `created_at`, `updated_at`) VALUES
(1, 1, 'cricket', 'Lahore Strikers', 'LHR', 'Babar K.', NULL, NULL, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(2, 1, 'cricket', 'Karachi Blasters', 'KHI', 'Rohit S.', NULL, NULL, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(3, 1, 'futsal', 'Red Devils FC', 'RDF', 'Zayn Malik', NULL, NULL, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(4, 1, 'futsal', 'Thunderbolts United', 'TBU', 'Rashid Mehmood', NULL, NULL, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(5, 1, 'padel', 'Hamza & Bilal (Team Alpha)', 'H&B', 'Hamza Ali', NULL, NULL, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(6, 1, 'padel', 'Taimoor & Saad (Team Beta)', 'T&S', 'Taimoor Khan', NULL, NULL, '2026-10-17 13:25:39', '2026-10-17 13:25:39');

-- --------------------------------------------------------

--
-- Table structure for table `team_challenges`
--

CREATE TABLE `team_challenges` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `challenger_team_id` bigint(20) UNSIGNED NOT NULL,
  `opponent_team_id` bigint(20) UNSIGNED NOT NULL,
  `sport_type` varchar(50) NOT NULL,
  `proposed_date` date NOT NULL,
  `proposed_slot` varchar(100) NOT NULL,
  `status` varchar(30) NOT NULL DEFAULT 'pending',
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `team_players`
--

CREATE TABLE `team_players` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `team_id` bigint(20) UNSIGNED NOT NULL,
  `player_id` bigint(20) UNSIGNED DEFAULT NULL,
  `player_name` varchar(255) NOT NULL,
  `role` varchar(255) DEFAULT NULL,
  `jersey_number` int(11) DEFAULT NULL,
  `is_captain` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `team_players`
--

INSERT INTO `team_players` (`id`, `team_id`, `player_id`, `player_name`, `role`, `jersey_number`, `is_captain`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'Babar K.', 'Batsman', 56, 1, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(2, 1, NULL, 'Rizwan M.', 'Wicket-Keeper / Batsman', 16, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(3, 1, NULL, 'Fakhar Z.', 'Batsman', 39, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(4, 1, NULL, 'Saim A.', 'All-Rounder', 63, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(5, 1, NULL, 'Shadab K.', 'All-Rounder / Leg-Spin', 7, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(6, 1, NULL, 'Shaheen A.', 'Bowler (Fast)', 10, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(7, 1, NULL, 'Naseem S.', 'Bowler (Fast)', 71, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(8, 2, NULL, 'Rohit S.', 'Batsman', 45, 1, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(9, 2, NULL, 'Virat K.', 'Batsman', 18, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(10, 2, NULL, 'Surya Y.', 'Batsman', 63, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(11, 2, NULL, 'Hardik P.', 'All-Rounder', 33, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(12, 2, NULL, 'Jasprit B.', 'Bowler (Fast)', 93, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(13, 2, NULL, 'Kuldeep Y.', 'Bowler (Spin)', 23, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(14, 3, NULL, 'Zayn Malik', 'Forward / Striker', 9, 1, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(15, 3, NULL, 'Ali Raza', 'Goalkeeper', 1, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(16, 3, NULL, 'Farhan Qureshi', 'Defender', 4, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(17, 3, NULL, 'Daniyal Sheikh', 'Midfielder', 8, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(18, 3, NULL, 'Omer Butt', 'Winger', 11, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(19, 4, NULL, 'Rashid Mehmood', 'Striker', 10, 1, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(20, 4, NULL, 'Kashif Khan', 'Goalkeeper', 1, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(21, 4, NULL, 'Musa Tariq', 'Defender', 3, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(22, 4, NULL, 'Waqas Ahmed', 'Midfielder', 7, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(23, 4, NULL, 'Hassan Bilal', 'Winger', 17, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(24, 5, NULL, 'Hamza Ali', 'Right Court Driver', 1, 1, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(25, 5, NULL, 'Bilal Tariq', 'Left Court Smasher', 2, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(26, 6, NULL, 'Taimoor Khan', 'Right Court Player', 1, 1, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(27, 6, NULL, 'Saad Farooq', 'Left Court Player', 2, 0, '2026-10-17 13:25:39', '2026-10-17 13:25:39'),
(28, 1, 2, 'Babar Azam', 'Captain / Batsman', 56, 0, '2026-10-17 13:43:27', '2026-10-17 13:43:27'),
(29, 1, 3, 'Shaheen Afridi', 'Strike Bowler', 10, 0, '2026-10-17 13:43:27', '2026-10-17 13:43:27'),
(30, 1, 4, 'Mohammad Rizwan', 'Wicketkeeper / Batsman', 16, 0, '2026-10-17 13:43:27', '2026-10-17 13:43:27'),
(31, 3, 5, 'Faris Ali', 'Striker', 9, 0, '2026-10-17 13:43:27', '2026-10-17 13:43:27'),
(32, 3, 6, 'Zayd Khan', 'Goalkeeper', 1, 0, '2026-10-17 13:43:27', '2026-10-17 13:43:27'),
(33, 5, 7, 'Hamza Tariq', 'Drive Specialist', 7, 0, '2026-10-17 13:43:27', '2026-10-17 13:43:27');

-- --------------------------------------------------------

--
-- Table structure for table `tenants`
--

CREATE TABLE `tenants` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tenants`
--

INSERT INTO `tenants` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`) VALUES
(1, NULL, NULL, NULL, NULL, 'Gaming Arena', NULL, 'active', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 11:33:16', '2026-10-17 11:33:16');

-- --------------------------------------------------------

--
-- Table structure for table `tournaments`
--

CREATE TABLE `tournaments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `game_type_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'draft',
  `wizard_step` int(11) NOT NULL DEFAULT 1,
  `wizard_state` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`wizard_state`)),
  `config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`config`)),
  `visibility` varchar(255) NOT NULL DEFAULT 'public',
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `venue_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`venue_ids`)),
  `officials_config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`officials_config`)),
  `prizes_config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`prizes_config`)),
  `banner_url` varchar(255) DEFAULT NULL,
  `logo_url` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tournament_bracket_matches`
--

CREATE TABLE `tournament_bracket_matches` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `tournament_name` varchar(255) NOT NULL,
  `round_name` varchar(50) NOT NULL,
  `match_order` int(11) NOT NULL DEFAULT 1,
  `team_a` varchar(255) NOT NULL,
  `team_b` varchar(255) NOT NULL,
  `score_summary` varchar(50) DEFAULT NULL,
  `winner_team` varchar(255) DEFAULT NULL,
  `court_assigned` varchar(255) DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'scheduled',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tournament_bracket_matches`
--

INSERT INTO `tournament_bracket_matches` (`id`, `tenant_id`, `tournament_name`, `round_name`, `match_order`, `team_a`, `team_b`, `score_summary`, `winner_team`, `court_assigned`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 'Gaming Arena Premier Padel Open 2026', 'Semi-Final 1', 1, 'Farhan Qureshi & Ahmed Raza', 'Daniyal Ahmed & Usman Tariq', '6-3, 7-6', 'Farhan Qureshi & Ahmed Raza', 'Court 1 (Panoramic Glass)', 'completed', '2026-10-17 16:33:29', '2026-10-17 16:33:29'),
(2, 1, 'Gaming Arena Premier Padel Open 2026', 'Semi-Final 2', 2, 'Zayd Malik & Omer Siddiqui', 'Bilal Sheikh & Hamza Ali', '4-6, 6-4, 6-3', 'Zayd Malik & Omer Siddiqui', 'Court 2 (Pro Turf)', 'completed', '2026-10-17 16:33:29', '2026-10-17 16:33:29'),
(3, 1, 'Gaming Arena Premier Padel Open 2026', 'Grand Finale', 3, 'Farhan Qureshi & Ahmed Raza', 'Zayd Malik & Omer Siddiqui', 'Live 1st Set (4-3)', NULL, 'Center Court (Live Broadcast)', 'live', '2026-10-17 16:33:29', '2026-10-17 16:33:29');

-- --------------------------------------------------------

--
-- Table structure for table `tournament_categories`
--

CREATE TABLE `tournament_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `sport_code` varchar(50) NOT NULL DEFAULT 'padel',
  `name` varchar(100) NOT NULL,
  `skill_level` varchar(50) NOT NULL DEFAULT 'open',
  `gender` varchar(20) NOT NULL DEFAULT 'all',
  `min_age` int(10) UNSIGNED DEFAULT NULL,
  `max_age` int(10) UNSIGNED DEFAULT NULL,
  `default_entry_fee` decimal(10,2) NOT NULL DEFAULT 5000.00,
  `max_teams` int(10) UNSIGNED NOT NULL DEFAULT 16,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `rules_note` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `tournament_categories`
--

INSERT INTO `tournament_categories` (`id`, `tenant_id`, `sport_code`, `name`, `skill_level`, `gender`, `min_age`, `max_age`, `default_entry_fee`, `max_teams`, `is_active`, `rules_note`, `created_at`, `updated_at`) VALUES
(1, 1, 'padel', 'Men\'s Open Pro (Category A)', 'pro', 'male', NULL, NULL, 8000.00, 16, 1, 'Official FIP Rules, best of 3 sets with tie-break.', '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(2, 1, 'padel', 'Corporate Executive Doubles', 'intermediate', 'all', NULL, NULL, 12000.00, 12, 1, 'Corporate team entries only. Custom trophies & networking.', '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(3, 1, 'cricket', 'Night Tape-Ball Super League', 'open', 'male', NULL, NULL, 6000.00, 16, 1, '6 overs per innings, 6 players a-side.', '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(4, 1, 'futsal', 'Lahore Futsal Championship', 'advanced', 'all', NULL, NULL, 10000.00, 16, 1, '5v5 rolling substitutions, 15 minutes per half.', '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(5, 1, 'snooker', 'Master Cueist Knockout', 'open', 'all', NULL, NULL, 3500.00, 32, 1, 'Best of 5 frames, semi/final best of 7.', '2026-10-17 05:54:25', '2026-10-17 05:54:25'),
(6, 1, 'playstation', 'EA FC 25 Ultimate Tournament', 'open', 'all', NULL, NULL, 2000.00, 32, 1, '6-minute halves, tactical defending, knockout.', '2026-10-17 05:54:25', '2026-10-17 05:54:25');

-- --------------------------------------------------------

--
-- Table structure for table `tournament_divisions`
--

CREATE TABLE `tournament_divisions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `tournament_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `code` varchar(255) DEFAULT NULL,
  `gender` varchar(255) NOT NULL DEFAULT 'open',
  `skill_level` varchar(255) DEFAULT NULL,
  `min_age` int(11) DEFAULT NULL,
  `max_age` int(11) DEFAULT NULL,
  `entry_fee` decimal(12,2) NOT NULL DEFAULT 0.00,
  `max_entries` int(11) NOT NULL DEFAULT 16,
  `config_override` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`config_override`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tournament_entries`
--

CREATE TABLE `tournament_entries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `entry_type` varchar(255) NOT NULL DEFAULT 'team',
  `name` varchar(255) NOT NULL,
  `seed_number` int(11) DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'pending',
  `payment_status` varchar(255) NOT NULL DEFAULT 'unpaid',
  `amount_paid` decimal(12,2) NOT NULL DEFAULT 0.00,
  `payment_reference` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tournament_groups`
--

CREATE TABLE `tournament_groups` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tournament_matches`
--

CREATE TABLE `tournament_matches` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `tournament_id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `stage_id` bigint(20) UNSIGNED DEFAULT NULL,
  `group_id` bigint(20) UNSIGNED DEFAULT NULL,
  `resource_id` bigint(20) UNSIGNED DEFAULT NULL,
  `match_code` varchar(255) DEFAULT NULL,
  `round_number` int(11) NOT NULL DEFAULT 1,
  `scheduled_start_time` datetime DEFAULT NULL,
  `scheduled_end_time` datetime DEFAULT NULL,
  `entry1_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entry2_id` bigint(20) UNSIGNED DEFAULT NULL,
  `winner_entry_id` bigint(20) UNSIGNED DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'scheduled',
  `result_type` varchar(255) DEFAULT NULL,
  `result_summary` varchar(255) DEFAULT NULL,
  `active_scorer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `scorer_locked_at` timestamp NULL DEFAULT NULL,
  `match_metadata` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`match_metadata`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tournament_resources`
--

CREATE TABLE `tournament_resources` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `resource_type` varchar(255) NOT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `surface_type` varchar(255) DEFAULT NULL,
  `has_lighting` tinyint(1) NOT NULL DEFAULT 1,
  `is_indoor` tinyint(1) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `availability_rules` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`availability_rules`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tournament_resource_bookings`
--

CREATE TABLE `tournament_resource_bookings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `resource_id` bigint(20) UNSIGNED NOT NULL,
  `start_time` datetime NOT NULL,
  `end_time` datetime NOT NULL,
  `booking_type` varchar(255) NOT NULL DEFAULT 'tournament_match',
  `match_id` bigint(20) UNSIGNED DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'confirmed',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tournament_stages`
--

CREATE TABLE `tournament_stages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `stage_order` int(11) NOT NULL DEFAULT 1,
  `stage_type` varchar(255) NOT NULL,
  `stage_config` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`stage_config`)),
  `status` varchar(255) NOT NULL DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tournament_standings`
--

CREATE TABLE `tournament_standings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `division_id` bigint(20) UNSIGNED NOT NULL,
  `stage_id` bigint(20) UNSIGNED NOT NULL,
  `group_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entry_id` bigint(20) UNSIGNED NOT NULL,
  `played` int(11) NOT NULL DEFAULT 0,
  `won` int(11) NOT NULL DEFAULT 0,
  `lost` int(11) NOT NULL DEFAULT 0,
  `tied` int(11) NOT NULL DEFAULT 0,
  `no_result` int(11) NOT NULL DEFAULT 0,
  `points` int(11) NOT NULL DEFAULT 0,
  `net_run_rate` decimal(8,4) NOT NULL DEFAULT 0.0000,
  `runs_scored` int(11) NOT NULL DEFAULT 0,
  `overs_faced` decimal(6,1) NOT NULL DEFAULT 0.0,
  `runs_conceded` int(11) NOT NULL DEFAULT 0,
  `overs_bowled` decimal(6,1) NOT NULL DEFAULT 0.0,
  `sets_won` int(11) NOT NULL DEFAULT 0,
  `sets_lost` int(11) NOT NULL DEFAULT 0,
  `games_won` int(11) NOT NULL DEFAULT 0,
  `games_lost` int(11) NOT NULL DEFAULT 0,
  `set_difference` int(11) NOT NULL DEFAULT 0,
  `game_difference` int(11) NOT NULL DEFAULT 0,
  `rank` int(11) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `units`
--

CREATE TABLE `units` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `property_id` bigint(20) UNSIGNED DEFAULT NULL,
  `unit_code` varchar(255) DEFAULT NULL,
  `floor` varchar(255) DEFAULT NULL,
  `size_sqft` decimal(10,2) DEFAULT NULL,
  `base_rent` decimal(12,2) DEFAULT NULL,
  `unit_number` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `units`
--

INSERT INTO `units` (`id`, `tenant_id`, `supplier_id`, `warehouse_id`, `customer_id`, `name`, `description`, `status`, `type`, `invoice_number`, `issue_date`, `due_date`, `subtotal`, `tax`, `total`, `items`, `account_id`, `debit`, `credit`, `date`, `source_type`, `source_id`, `journal_ref`, `email`, `mobile`, `salary`, `department_id`, `designation_id`, `division_id`, `shift_id`, `leave_allowance`, `off_days`, `late_threshold`, `absence_deduction`, `leave_over_quota_deduction`, `pipeline`, `join_date`, `employee_id`, `entity_type`, `entity_id`, `action`, `reason`, `user_id`, `facility_type`, `resource_count`, `base_price`, `peak_price`, `shared_space_group`, `venue_id`, `start_time`, `end_time`, `facility_id`, `validated_at`, `payment_status`, `amount`, `court_number`, `created_at`, `updated_at`, `property_id`, `unit_code`, `floor`, `size_sqft`, `base_rent`, `unit_number`) VALUES
(1, 1, NULL, NULL, NULL, 'Ground Floor Café & Juice Bar', NULL, 'Occupied', 'Food & Beverage', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 1, 'JBA-G01', 'Ground', 1250.00, 85000.00, 'Shop #G-01'),
(2, 1, NULL, NULL, NULL, 'Smash Sports Pro Shop & Gear', NULL, 'Occupied', 'Retail / Sports Gear', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 1, 'JBA-G02', 'Ground', 950.00, 65000.00, 'Shop #G-02'),
(3, 1, NULL, NULL, NULL, 'Crust & Burger Rooftop Lounge', NULL, 'Occupied', 'Restaurant & Lounge', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 2, 'JBC-FC01', 'Rooftop', 2400.00, 150000.00, 'Food-Court #FC-01'),
(4, 1, NULL, NULL, NULL, 'Smoothie & Protein Shake Kiosk', NULL, 'Available', 'Kiosk', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.00, 0.00, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-10-17 14:24:05', '2026-10-17 14:24:05', 2, 'JBC-K01', '1st Floor', 300.00, 35000.00, 'Kiosk #K-01');

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `password_hash` varchar(255) DEFAULT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT 1,
  `role` varchar(50) NOT NULL DEFAULT 'admin',
  `mobile` varchar(50) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `membership_tier` varchar(50) NOT NULL DEFAULT 'Bronze',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `gate_access` text DEFAULT NULL,
  `avatar_url` varchar(255) DEFAULT NULL,
  `permissions` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`permissions`))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `venues`
--

CREATE TABLE `venues` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `walk_in_sessions`
--

CREATE TABLE `walk_in_sessions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `wallet_low_balance_triggers`
--

CREATE TABLE `wallet_low_balance_triggers` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_name` varchar(100) NOT NULL,
  `customer_phone` varchar(30) NOT NULL,
  `current_balance` decimal(10,2) NOT NULL DEFAULT 450.00,
  `threshold_trigger_amount` decimal(10,2) NOT NULL DEFAULT 1000.00,
  `whatsapp_dispatch_status` varchar(30) NOT NULL DEFAULT 'sent',
  `one_click_topup_token` varchar(64) NOT NULL,
  `last_alert_sent_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `wallet_low_balance_triggers`
--

INSERT INTO `wallet_low_balance_triggers` (`id`, `tenant_id`, `customer_id`, `customer_name`, `customer_phone`, `current_balance`, `threshold_trigger_amount`, `whatsapp_dispatch_status`, `one_click_topup_token`, `last_alert_sent_at`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'Kamran Ali (Corporate Member)', '+92 300 9876543', 350.00, 1000.00, 'sent', 'c886c0d1ec61e72c18148d46f6cc106b', '2026-10-17 14:23:36', '2026-10-17 17:23:36', '2026-10-17 17:23:36'),
(2, 1, NULL, 'Zainab Raza', '+92 321 4433221', 600.00, 1000.00, 'sent', '2baaaf92a9cef5a08e4c9726214fba52', '2026-10-17 16:23:36', '2026-10-17 17:23:36', '2026-10-17 17:23:36');

-- --------------------------------------------------------

--
-- Table structure for table `warehouses`
--

CREATE TABLE `warehouses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `code` varchar(255) DEFAULT NULL,
  `location` varchar(255) DEFAULT NULL,
  `capacity` int(11) DEFAULT 0,
  `is_primary` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `warehouse_stock`
--

CREATE TABLE `warehouse_stock` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `warehouse_id` bigint(20) UNSIGNED NOT NULL,
  `item_id` bigint(20) UNSIGNED NOT NULL,
  `quantity` decimal(12,2) NOT NULL DEFAULT 0.00,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `weather_rain_logs`
--

CREATE TABLE `weather_rain_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `city` varchar(50) NOT NULL DEFAULT 'Lahore',
  `temperature_c` decimal(4,1) NOT NULL DEFAULT 28.5,
  `precipitation_chance_pct` int(11) NOT NULL DEFAULT 75,
  `condition_text` varchar(100) NOT NULL DEFAULT 'Thunderstorm & Heavy Rain',
  `rain_alert_active` tinyint(1) NOT NULL DEFAULT 1,
  `action_triggered` varchar(255) NOT NULL DEFAULT '12 Outdoor Court bookings auto-credited with 100% weather voucher',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `weather_rain_logs`
--

INSERT INTO `weather_rain_logs` (`id`, `tenant_id`, `city`, `temperature_c`, `precipitation_chance_pct`, `condition_text`, `rain_alert_active`, `action_triggered`, `created_at`, `updated_at`) VALUES
(1, 1, 'Lahore', 26.0, 85, 'High Rain & Surface Wetness Warning', 1, 'Outdoor Padel Court 3 & 4 automatically placed on Rain Protection Mode; affected bookings auto-refunded to player digital wallets.', '2026-10-17 16:46:26', '2026-10-17 16:46:26');

-- --------------------------------------------------------

--
-- Table structure for table `whatsapp_booking_logs`
--

CREATE TABLE `whatsapp_booking_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED NOT NULL DEFAULT 1,
  `booking_id` bigint(20) UNSIGNED DEFAULT NULL,
  `recipient_name` varchar(255) NOT NULL,
  `phone_number` varchar(255) NOT NULL,
  `message_payload` text DEFAULT NULL,
  `qr_checkin_token` varchar(64) DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'sent',
  `checked_in_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `whatsapp_booking_logs`
--

INSERT INTO `whatsapp_booking_logs` (`id`, `tenant_id`, `booking_id`, `recipient_name`, `phone_number`, `message_payload`, `qr_checkin_token`, `status`, `checked_in_at`, `created_at`, `updated_at`) VALUES
(1, 1, 101, 'Daniyal Ahmed', '+923001234567', 'Salam Daniyal! Your booking for Court 1 (Padel) on Friday 8:00 PM is CONFIRMED. Check-in QR: JB-QR-98234', 'JB-QR-98234', 'sent', NULL, '2026-10-17 16:27:56', '2026-10-17 16:27:56'),
(2, 1, 102, 'Usman Tariq', '+923219876543', 'Salam Usman! Your booking for Court 2 on Saturday 7:00 PM is CONFIRMED. Check-in QR: JB-QR-11442', 'JB-QR-11442', 'checked_in', '2026-10-17 16:12:56', '2026-10-17 14:27:56', '2026-10-17 16:12:56');

-- --------------------------------------------------------

--
-- Table structure for table `whatsapp_campaigns`
--

CREATE TABLE `whatsapp_campaigns` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tenant_id` bigint(20) UNSIGNED DEFAULT NULL,
  `supplier_id` bigint(20) UNSIGNED DEFAULT NULL,
  `warehouse_id` bigint(20) UNSIGNED DEFAULT NULL,
  `customer_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `invoice_number` varchar(255) DEFAULT NULL,
  `issue_date` datetime DEFAULT NULL,
  `due_date` datetime DEFAULT NULL,
  `subtotal` decimal(8,2) DEFAULT NULL,
  `tax` decimal(8,2) DEFAULT NULL,
  `total` decimal(8,2) DEFAULT NULL,
  `items` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`items`)),
  `account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `debit` decimal(12,2) DEFAULT 0.00,
  `credit` decimal(12,2) DEFAULT 0.00,
  `date` date DEFAULT NULL,
  `source_type` varchar(255) DEFAULT NULL,
  `source_id` bigint(20) UNSIGNED DEFAULT NULL,
  `journal_ref` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `salary` decimal(12,2) DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `designation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `division_id` bigint(20) UNSIGNED DEFAULT NULL,
  `shift_id` bigint(20) UNSIGNED DEFAULT NULL,
  `leave_allowance` int(11) DEFAULT NULL,
  `off_days` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`off_days`)),
  `late_threshold` int(11) DEFAULT NULL,
  `absence_deduction` decimal(8,2) DEFAULT NULL,
  `leave_over_quota_deduction` decimal(8,2) DEFAULT NULL,
  `pipeline` varchar(255) DEFAULT NULL,
  `join_date` date DEFAULT NULL,
  `employee_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) DEFAULT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `reason` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `facility_type` varchar(255) DEFAULT NULL,
  `resource_count` int(11) DEFAULT NULL,
  `base_price` decimal(10,2) DEFAULT NULL,
  `peak_price` decimal(10,2) DEFAULT NULL,
  `shared_space_group` varchar(255) DEFAULT NULL,
  `venue_id` bigint(20) UNSIGNED DEFAULT NULL,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `facility_id` bigint(20) UNSIGNED DEFAULT NULL,
  `validated_at` datetime DEFAULT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  `amount` decimal(10,2) DEFAULT NULL,
  `court_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `ai_voice_commands`
--
ALTER TABLE `ai_voice_commands`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `arena_sound_fx`
--
ALTER TABLE `arena_sound_fx`
  ADD PRIMARY KEY (`id`),
  ADD KEY `arena_sound_fx_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `asset_maintenance_logs`
--
ALTER TABLE `asset_maintenance_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `asset_maintenance_logs_tenant_id_index` (`tenant_id`),
  ADD KEY `asset_maintenance_logs_asset_id_index` (`asset_id`);

--
-- Indexes for table `attendance`
--
ALTER TABLE `attendance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `attendances`
--
ALTER TABLE `attendances`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `audit_log`
--
ALTER TABLE `audit_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bank_accounts`
--
ALTER TABLE `bank_accounts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bank_transactions`
--
ALTER TABLE `bank_transactions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `biometric_access_logs`
--
ALTER TABLE `biometric_access_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bookings`
--
ALTER TABLE `bookings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_bookings_tenant_time` (`tenant_id`,`start_time`),
  ADD KEY `idx_bookings_tenant_status` (`tenant_id`,`status`),
  ADD KEY `idx_bookings_facility_tenant` (`facility_id`,`tenant_id`),
  ADD KEY `idx_bookings_tenant_created` (`tenant_id`,`created_at`),
  ADD KEY `idx_bookings_customer_id` (`customer_id`);

--
-- Indexes for table `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_expiration_index` (`expiration`);

--
-- Indexes for table `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_locks_expiration_index` (`expiration`);

--
-- Indexes for table `campaigns`
--
ALTER TABLE `campaigns`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cashier_shifts`
--
ALTER TABLE `cashier_shifts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cashier_shift_transactions`
--
ALTER TABLE `cashier_shift_transactions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cash_deposits`
--
ALTER TABLE `cash_deposits`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cash_withdrawals`
--
ALTER TABLE `cash_withdrawals`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `chart_of_accounts`
--
ALTER TABLE `chart_of_accounts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `chat_threads`
--
ALTER TABLE `chat_threads`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `coaches`
--
ALTER TABLE `coaches`
  ADD PRIMARY KEY (`id`),
  ADD KEY `coaches_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `coaching_sessions`
--
ALTER TABLE `coaching_sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `coaching_sessions_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `coach_private_lessons`
--
ALTER TABLE `coach_private_lessons`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `community_posts`
--
ALTER TABLE `community_posts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `corporate_bookings`
--
ALTER TABLE `corporate_bookings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `corporate_clients`
--
ALTER TABLE `corporate_clients`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_corporate_tenant` (`tenant_id`);

--
-- Indexes for table `corporate_invoices`
--
ALTER TABLE `corporate_invoices`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `corporate_payment_reminders`
--
ALTER TABLE `corporate_payment_reminders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `court_energy_meters`
--
ALTER TABLE `court_energy_meters`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `court_hourly_heatmaps`
--
ALTER TABLE `court_hourly_heatmaps`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_heatmaps_tenant_day_hour` (`tenant_id`,`day_of_week`,`hour_of_day`);

--
-- Indexes for table `court_iot_devices`
--
ALTER TABLE `court_iot_devices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tenant_id` (`tenant_id`,`facility_id`);

--
-- Indexes for table `court_screens`
--
ALTER TABLE `court_screens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `court_screens_screen_token_unique` (`screen_token`);

--
-- Indexes for table `court_video_replays`
--
ALTER TABLE `court_video_replays`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cricket_session_stats`
--
ALTER TABLE `cricket_session_stats`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cricket_session_stats_booking_id_index` (`booking_id`),
  ADD KEY `cricket_session_stats_player_id_index` (`player_id`);

--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_customers_tenant_mobile` (`tenant_id`,`mobile`),
  ADD KEY `idx_customers_membership` (`membership_tier`);

--
-- Indexes for table `customer_spend_tiers`
--
ALTER TABLE `customer_spend_tiers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `daily_executive_digests`
--
ALTER TABLE `daily_executive_digests`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `digital_nfc_wallet_passes`
--
ALTER TABLE `digital_nfc_wallet_passes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `discount_campaigns`
--
ALTER TABLE `discount_campaigns`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `discount_campaigns_code_unique` (`code`);

--
-- Indexes for table `employees`
--
ALTER TABLE `employees`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `entry_players`
--
ALTER TABLE `entry_players`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `entry_players_entry_id_player_id_unique` (`entry_id`,`player_id`),
  ADD KEY `entry_players_player_id_foreign` (`player_id`);

--
-- Indexes for table `equipment`
--
ALTER TABLE `equipment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `equipment_wear_trackers`
--
ALTER TABLE `equipment_wear_trackers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `esports_squads`
--
ALTER TABLE `esports_squads`
  ADD PRIMARY KEY (`id`),
  ADD KEY `esports_squads_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `expense_categories`
--
ALTER TABLE `expense_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `facilities`
--
ALTER TABLE `facilities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_facilities_tenant_status` (`tenant_id`,`status`),
  ADD KEY `idx_facilities_type` (`facility_type`);

--
-- Indexes for table `facility_floor_nodes`
--
ALTER TABLE `facility_floor_nodes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `financial_budgets`
--
ALTER TABLE `financial_budgets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tenant_id` (`tenant_id`,`fiscal_year`,`fiscal_month`);

--
-- Indexes for table `fixed_assets`
--
ALTER TABLE `fixed_assets`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `fixed_assets_asset_code_unique` (`asset_code`),
  ADD KEY `fixed_assets_tenant_id_index` (`tenant_id`),
  ADD KEY `fixed_assets_category_index` (`category`),
  ADD KEY `fixed_assets_facility_id_index` (`facility_id`);

--
-- Indexes for table `franchise_clubs`
--
ALTER TABLE `franchise_clubs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gamer_profiles`
--
ALTER TABLE `gamer_profiles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `gamer_profiles_gamer_tag_unique` (`gamer_tag`),
  ADD KEY `gamer_profiles_tenant_id_index` (`tenant_id`),
  ADD KEY `gamer_profiles_customer_id_index` (`customer_id`);

--
-- Indexes for table `game_types`
--
ALTER TABLE `game_types`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `game_types_sport_id_code_unique` (`sport_id`,`code`);

--
-- Indexes for table `general_ledger`
--
ALTER TABLE `general_ledger`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `integration_webhooks`
--
ALTER TABLE `integration_webhooks`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `integration_webhooks_service_key_unique` (`service_key`);

--
-- Indexes for table `inventory_items`
--
ALTER TABLE `inventory_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `invoices`
--
ALTER TABLE `invoices`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Indexes for table `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kds_orders`
--
ALTER TABLE `kds_orders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kiosk_checkin_logs`
--
ALTER TABLE `kiosk_checkin_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `leagues`
--
ALTER TABLE `leagues`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `leases`
--
ALTER TABLE `leases`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `leases_pos_api_key_unique` (`pos_api_key`);

--
-- Indexes for table `leave_requests`
--
ALTER TABLE `leave_requests`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ledger_transactions`
--
ALTER TABLE `ledger_transactions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `live_matches`
--
ALTER TABLE `live_matches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `loyalty_earn_settings`
--
ALTER TABLE `loyalty_earn_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `loyalty_rewards`
--
ALTER TABLE `loyalty_rewards`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `loyalty_transactions`
--
ALTER TABLE `loyalty_transactions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `maintenance_records`
--
ALTER TABLE `maintenance_records`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `maintenance_windows`
--
ALTER TABLE `maintenance_windows`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `match_ball_logs`
--
ALTER TABLE `match_ball_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `match_events`
--
ALTER TABLE `match_events`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `match_events_match_id_seq_number_unique` (`match_id`,`seq_number`),
  ADD KEY `match_events_seq_number_index` (`seq_number`),
  ADD KEY `match_events_idempotency_key_index` (`idempotency_key`),
  ADD KEY `match_events_recorded_by_index` (`recorded_by`),
  ADD KEY `match_events_created_at_index` (`created_at`);

--
-- Indexes for table `match_highlights`
--
ALTER TABLE `match_highlights`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `match_highlights_studio`
--
ALTER TABLE `match_highlights_studio`
  ADD PRIMARY KEY (`id`),
  ADD KEY `match_highlights_studio_tenant_id_index` (`tenant_id`),
  ADD KEY `match_highlights_studio_match_id_index` (`match_id`);

--
-- Indexes for table `match_lobbies`
--
ALTER TABLE `match_lobbies`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tenant_id` (`tenant_id`,`status`);

--
-- Indexes for table `match_overs_log`
--
ALTER TABLE `match_overs_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `match_player_stats`
--
ALTER TABLE `match_player_stats`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `match_states`
--
ALTER TABLE `match_states`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `match_states_match_id_unique` (`match_id`);

--
-- Indexes for table `match_summary_cards`
--
ALTER TABLE `match_summary_cards`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `medical_incident_reports`
--
ALTER TABLE `medical_incident_reports`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `memberships`
--
ALTER TABLE `memberships`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mobile_push_notifications`
--
ALTER TABLE `mobile_push_notifications`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `module_registry`
--
ALTER TABLE `module_registry`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `module_registry_module_key_unique` (`module_key`);

--
-- Indexes for table `outbound_webhook_logs`
--
ALTER TABLE `outbound_webhook_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packages`
--
ALTER TABLE `packages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_payments_tenant_date` (`tenant_id`,`created_at`),
  ADD KEY `idx_payments_booking_id` (`booking_id`),
  ADD KEY `idx_payments_status` (`status`);

--
-- Indexes for table `payment_webhook_events`
--
ALTER TABLE `payment_webhook_events`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `payment_webhook_events_idempotency_key_unique` (`idempotency_key`),
  ADD KEY `payment_webhook_events_tenant_id_gateway_name_created_at_index` (`tenant_id`,`gateway_name`,`created_at`),
  ADD KEY `payment_webhook_events_tenant_id_index` (`tenant_id`),
  ADD KEY `payment_webhook_events_gateway_name_index` (`gateway_name`),
  ADD KEY `payment_webhook_events_event_id_index` (`event_id`),
  ADD KEY `payment_webhook_events_booking_id_index` (`booking_id`),
  ADD KEY `payment_webhook_events_pos_sale_id_index` (`pos_sale_id`);

--
-- Indexes for table `payroll_runs`
--
ALTER TABLE `payroll_runs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_unique` (`name`);

--
-- Indexes for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`),
  ADD KEY `personal_access_tokens_expires_at_index` (`expires_at`);

--
-- Indexes for table `players`
--
ALTER TABLE `players`
  ADD PRIMARY KEY (`id`),
  ADD KEY `players_tenant_id_index` (`tenant_id`),
  ADD KEY `players_user_id_index` (`user_id`),
  ADD KEY `players_phone_index` (`phone`),
  ADD KEY `players_email_index` (`email`);

--
-- Indexes for table `player_elo_ratings`
--
ALTER TABLE `player_elo_ratings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `player_milestone_badges`
--
ALTER TABLE `player_milestone_badges`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `player_notifications`
--
ALTER TABLE `player_notifications`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `player_profiles`
--
ALTER TABLE `player_profiles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `player_profiles_player_id_sport_id_unique` (`player_id`,`sport_id`),
  ADD KEY `player_profiles_sport_id_foreign` (`sport_id`);

--
-- Indexes for table `player_ratings`
--
ALTER TABLE `player_ratings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `player_ratings_player_id_sport_id_game_type_id_unique` (`player_id`,`sport_id`,`game_type_id`),
  ADD KEY `player_ratings_sport_id_foreign` (`sport_id`),
  ADD KEY `player_ratings_game_type_id_foreign` (`game_type_id`);

--
-- Indexes for table `pos_printer_templates`
--
ALTER TABLE `pos_printer_templates`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `properties`
--
ALTER TABLE `properties`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `property_renters`
--
ALTER TABLE `property_renters`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `purchase_orders`
--
ALTER TABLE `purchase_orders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `racket_stringing_jobs`
--
ALTER TABLE `racket_stringing_jobs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `referee_match_scores`
--
ALTER TABLE `referee_match_scores`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `renters`
--
ALTER TABLE `renters`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rent_invoices`
--
ALTER TABLE `rent_invoices`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rent_payments`
--
ALTER TABLE `rent_payments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `reports`
--
ALTER TABLE `reports`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `restaurant_sales_reports`
--
ALTER TABLE `restaurant_sales_reports`
  ADD PRIMARY KEY (`id`),
  ADD KEY `restaurant_sales_reports_lease_id_index` (`lease_id`);

--
-- Indexes for table `revenue_share_slabs`
--
ALTER TABLE `revenue_share_slabs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `revenue_share_slabs_lease_id_index` (`lease_id`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_unique` (`name`);

--
-- Indexes for table `role_permissions`
--
ALTER TABLE `role_permissions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `site_contents`
--
ALTER TABLE `site_contents`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `site_contents_key_unique` (`key`),
  ADD KEY `site_contents_section_index` (`section`);

--
-- Indexes for table `site_faqs`
--
ALTER TABLE `site_faqs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_galleries`
--
ALTER TABLE `site_galleries`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `site_testimonials`
--
ALTER TABLE `site_testimonials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sports`
--
ALTER TABLE `sports`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sports_code_unique` (`code`);

--
-- Indexes for table `sport_rules`
--
ALTER TABLE `sport_rules`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sport_rules_sport_type_unique` (`sport_type`);

--
-- Indexes for table `staff_payroll_shifts`
--
ALTER TABLE `staff_payroll_shifts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_shifts_tenant_date` (`tenant_id`,`shift_date`);

--
-- Indexes for table `suppliers`
--
ALTER TABLE `suppliers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `supplier_payments`
--
ALTER TABLE `supplier_payments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `support_tickets`
--
ALTER TABLE `support_tickets`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `surge_pricing_rules`
--
ALTER TABLE `surge_pricing_rules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tenant_id` (`tenant_id`,`is_active`);

--
-- Indexes for table `system_backup_vaults`
--
ALTER TABLE `system_backup_vaults`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tax_rates`
--
ALTER TABLE `tax_rates`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `teams`
--
ALTER TABLE `teams`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `team_challenges`
--
ALTER TABLE `team_challenges`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `team_players`
--
ALTER TABLE `team_players`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tenants`
--
ALTER TABLE `tenants`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tournaments`
--
ALTER TABLE `tournaments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tournaments_game_type_id_foreign` (`game_type_id`),
  ADD KEY `tournaments_tenant_id_index` (`tenant_id`),
  ADD KEY `tournaments_slug_index` (`slug`),
  ADD KEY `tournaments_status_index` (`status`);

--
-- Indexes for table `tournament_bracket_matches`
--
ALTER TABLE `tournament_bracket_matches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tournament_categories`
--
ALTER TABLE `tournament_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tournament_divisions`
--
ALTER TABLE `tournament_divisions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tournament_divisions_tournament_id_foreign` (`tournament_id`),
  ADD KEY `tournament_divisions_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `tournament_entries`
--
ALTER TABLE `tournament_entries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tournament_entries_division_id_foreign` (`division_id`),
  ADD KEY `tournament_entries_tenant_id_index` (`tenant_id`);

--
-- Indexes for table `tournament_groups`
--
ALTER TABLE `tournament_groups`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tournament_groups_stage_id_foreign` (`stage_id`);

--
-- Indexes for table `tournament_matches`
--
ALTER TABLE `tournament_matches`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tournament_matches_tournament_id_foreign` (`tournament_id`),
  ADD KEY `tournament_matches_division_id_foreign` (`division_id`),
  ADD KEY `tournament_matches_stage_id_foreign` (`stage_id`),
  ADD KEY `tournament_matches_group_id_foreign` (`group_id`),
  ADD KEY `tournament_matches_resource_id_foreign` (`resource_id`),
  ADD KEY `tournament_matches_entry1_id_foreign` (`entry1_id`),
  ADD KEY `tournament_matches_entry2_id_foreign` (`entry2_id`),
  ADD KEY `tournament_matches_winner_entry_id_foreign` (`winner_entry_id`),
  ADD KEY `tournament_matches_tenant_id_index` (`tenant_id`),
  ADD KEY `tournament_matches_match_code_index` (`match_code`),
  ADD KEY `tournament_matches_scheduled_start_time_index` (`scheduled_start_time`),
  ADD KEY `tournament_matches_active_scorer_id_index` (`active_scorer_id`);

--
-- Indexes for table `tournament_resources`
--
ALTER TABLE `tournament_resources`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tournament_resources_tenant_id_index` (`tenant_id`),
  ADD KEY `tournament_resources_venue_id_index` (`venue_id`);

--
-- Indexes for table `tournament_resource_bookings`
--
ALTER TABLE `tournament_resource_bookings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tr_resource_time_idx` (`resource_id`,`start_time`,`end_time`),
  ADD KEY `tournament_resource_bookings_tenant_id_index` (`tenant_id`),
  ADD KEY `tournament_resource_bookings_start_time_index` (`start_time`),
  ADD KEY `tournament_resource_bookings_end_time_index` (`end_time`),
  ADD KEY `tournament_resource_bookings_match_id_index` (`match_id`);

--
-- Indexes for table `tournament_stages`
--
ALTER TABLE `tournament_stages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tournament_stages_division_id_foreign` (`division_id`);

--
-- Indexes for table `tournament_standings`
--
ALTER TABLE `tournament_standings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tournament_standings_stage_id_entry_id_unique` (`stage_id`,`entry_id`),
  ADD KEY `tournament_standings_division_id_foreign` (`division_id`),
  ADD KEY `tournament_standings_group_id_foreign` (`group_id`),
  ADD KEY `tournament_standings_entry_id_foreign` (`entry_id`);

--
-- Indexes for table `units`
--
ALTER TABLE `units`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`);

--
-- Indexes for table `venues`
--
ALTER TABLE `venues`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `walk_in_sessions`
--
ALTER TABLE `walk_in_sessions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `wallet_low_balance_triggers`
--
ALTER TABLE `wallet_low_balance_triggers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `warehouses`
--
ALTER TABLE `warehouses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `warehouse_stock`
--
ALTER TABLE `warehouse_stock`
  ADD PRIMARY KEY (`id`),
  ADD KEY `warehouse_stock_tenant_id_index` (`tenant_id`),
  ADD KEY `warehouse_stock_warehouse_id_index` (`warehouse_id`),
  ADD KEY `warehouse_stock_item_id_index` (`item_id`);

--
-- Indexes for table `weather_rain_logs`
--
ALTER TABLE `weather_rain_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `whatsapp_booking_logs`
--
ALTER TABLE `whatsapp_booking_logs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `whatsapp_campaigns`
--
ALTER TABLE `whatsapp_campaigns`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `ai_voice_commands`
--
ALTER TABLE `ai_voice_commands`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `arena_sound_fx`
--
ALTER TABLE `arena_sound_fx`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `asset_maintenance_logs`
--
ALTER TABLE `asset_maintenance_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `attendance`
--
ALTER TABLE `attendance`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `attendances`
--
ALTER TABLE `attendances`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `audit_log`
--
ALTER TABLE `audit_log`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bank_accounts`
--
ALTER TABLE `bank_accounts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `bank_transactions`
--
ALTER TABLE `bank_transactions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `biometric_access_logs`
--
ALTER TABLE `biometric_access_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `bookings`
--
ALTER TABLE `bookings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46;

--
-- AUTO_INCREMENT for table `campaigns`
--
ALTER TABLE `campaigns`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cashier_shifts`
--
ALTER TABLE `cashier_shifts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `cashier_shift_transactions`
--
ALTER TABLE `cashier_shift_transactions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `cash_deposits`
--
ALTER TABLE `cash_deposits`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cash_withdrawals`
--
ALTER TABLE `cash_withdrawals`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `chart_of_accounts`
--
ALTER TABLE `chart_of_accounts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `chat_threads`
--
ALTER TABLE `chat_threads`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `coaches`
--
ALTER TABLE `coaches`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `coaching_sessions`
--
ALTER TABLE `coaching_sessions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `coach_private_lessons`
--
ALTER TABLE `coach_private_lessons`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `community_posts`
--
ALTER TABLE `community_posts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `corporate_bookings`
--
ALTER TABLE `corporate_bookings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `corporate_clients`
--
ALTER TABLE `corporate_clients`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `corporate_invoices`
--
ALTER TABLE `corporate_invoices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `corporate_payment_reminders`
--
ALTER TABLE `corporate_payment_reminders`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `court_energy_meters`
--
ALTER TABLE `court_energy_meters`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `court_hourly_heatmaps`
--
ALTER TABLE `court_hourly_heatmaps`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `court_iot_devices`
--
ALTER TABLE `court_iot_devices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `court_screens`
--
ALTER TABLE `court_screens`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `court_video_replays`
--
ALTER TABLE `court_video_replays`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `cricket_session_stats`
--
ALTER TABLE `cricket_session_stats`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `customer_spend_tiers`
--
ALTER TABLE `customer_spend_tiers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `daily_executive_digests`
--
ALTER TABLE `daily_executive_digests`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `digital_nfc_wallet_passes`
--
ALTER TABLE `digital_nfc_wallet_passes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `discount_campaigns`
--
ALTER TABLE `discount_campaigns`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `employees`
--
ALTER TABLE `employees`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `entry_players`
--
ALTER TABLE `entry_players`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `equipment`
--
ALTER TABLE `equipment`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `equipment_wear_trackers`
--
ALTER TABLE `equipment_wear_trackers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `esports_squads`
--
ALTER TABLE `esports_squads`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `expense_categories`
--
ALTER TABLE `expense_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `facilities`
--
ALTER TABLE `facilities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `facility_floor_nodes`
--
ALTER TABLE `facility_floor_nodes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `financial_budgets`
--
ALTER TABLE `financial_budgets`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `fixed_assets`
--
ALTER TABLE `fixed_assets`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `franchise_clubs`
--
ALTER TABLE `franchise_clubs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `gamer_profiles`
--
ALTER TABLE `gamer_profiles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `game_types`
--
ALTER TABLE `game_types`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `general_ledger`
--
ALTER TABLE `general_ledger`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=91;

--
-- AUTO_INCREMENT for table `integration_webhooks`
--
ALTER TABLE `integration_webhooks`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `inventory_items`
--
ALTER TABLE `inventory_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `invoices`
--
ALTER TABLE `invoices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `kds_orders`
--
ALTER TABLE `kds_orders`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `kiosk_checkin_logs`
--
ALTER TABLE `kiosk_checkin_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `leagues`
--
ALTER TABLE `leagues`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `leases`
--
ALTER TABLE `leases`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `leave_requests`
--
ALTER TABLE `leave_requests`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ledger_transactions`
--
ALTER TABLE `ledger_transactions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `live_matches`
--
ALTER TABLE `live_matches`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `loyalty_earn_settings`
--
ALTER TABLE `loyalty_earn_settings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `loyalty_rewards`
--
ALTER TABLE `loyalty_rewards`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `loyalty_transactions`
--
ALTER TABLE `loyalty_transactions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `maintenance_records`
--
ALTER TABLE `maintenance_records`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `maintenance_windows`
--
ALTER TABLE `maintenance_windows`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `match_ball_logs`
--
ALTER TABLE `match_ball_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `match_events`
--
ALTER TABLE `match_events`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `match_highlights`
--
ALTER TABLE `match_highlights`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `match_highlights_studio`
--
ALTER TABLE `match_highlights_studio`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `match_lobbies`
--
ALTER TABLE `match_lobbies`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `match_overs_log`
--
ALTER TABLE `match_overs_log`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `match_player_stats`
--
ALTER TABLE `match_player_stats`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `match_states`
--
ALTER TABLE `match_states`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `match_summary_cards`
--
ALTER TABLE `match_summary_cards`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `medical_incident_reports`
--
ALTER TABLE `medical_incident_reports`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `memberships`
--
ALTER TABLE `memberships`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `mobile_push_notifications`
--
ALTER TABLE `mobile_push_notifications`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `module_registry`
--
ALTER TABLE `module_registry`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `outbound_webhook_logs`
--
ALTER TABLE `outbound_webhook_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `packages`
--
ALTER TABLE `packages`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `payments`
--
ALTER TABLE `payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `payment_webhook_events`
--
ALTER TABLE `payment_webhook_events`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `payroll_runs`
--
ALTER TABLE `payroll_runs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `players`
--
ALTER TABLE `players`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `player_elo_ratings`
--
ALTER TABLE `player_elo_ratings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `player_milestone_badges`
--
ALTER TABLE `player_milestone_badges`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `player_notifications`
--
ALTER TABLE `player_notifications`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `player_profiles`
--
ALTER TABLE `player_profiles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `player_ratings`
--
ALTER TABLE `player_ratings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `pos_printer_templates`
--
ALTER TABLE `pos_printer_templates`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `properties`
--
ALTER TABLE `properties`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `property_renters`
--
ALTER TABLE `property_renters`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `purchase_orders`
--
ALTER TABLE `purchase_orders`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `racket_stringing_jobs`
--
ALTER TABLE `racket_stringing_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `referee_match_scores`
--
ALTER TABLE `referee_match_scores`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `renters`
--
ALTER TABLE `renters`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rent_invoices`
--
ALTER TABLE `rent_invoices`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `rent_payments`
--
ALTER TABLE `rent_payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `reports`
--
ALTER TABLE `reports`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `restaurant_sales_reports`
--
ALTER TABLE `restaurant_sales_reports`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `revenue_share_slabs`
--
ALTER TABLE `revenue_share_slabs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `role_permissions`
--
ALTER TABLE `role_permissions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `site_contents`
--
ALTER TABLE `site_contents`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `site_faqs`
--
ALTER TABLE `site_faqs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `site_galleries`
--
ALTER TABLE `site_galleries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `site_testimonials`
--
ALTER TABLE `site_testimonials`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sports`
--
ALTER TABLE `sports`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `sport_rules`
--
ALTER TABLE `sport_rules`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `staff_payroll_shifts`
--
ALTER TABLE `staff_payroll_shifts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `suppliers`
--
ALTER TABLE `suppliers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `supplier_payments`
--
ALTER TABLE `supplier_payments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `support_tickets`
--
ALTER TABLE `support_tickets`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `surge_pricing_rules`
--
ALTER TABLE `surge_pricing_rules`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `system_backup_vaults`
--
ALTER TABLE `system_backup_vaults`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tax_rates`
--
ALTER TABLE `tax_rates`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `teams`
--
ALTER TABLE `teams`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `team_challenges`
--
ALTER TABLE `team_challenges`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `team_players`
--
ALTER TABLE `team_players`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT for table `tenants`
--
ALTER TABLE `tenants`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tournaments`
--
ALTER TABLE `tournaments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tournament_bracket_matches`
--
ALTER TABLE `tournament_bracket_matches`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `tournament_categories`
--
ALTER TABLE `tournament_categories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `tournament_divisions`
--
ALTER TABLE `tournament_divisions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tournament_entries`
--
ALTER TABLE `tournament_entries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tournament_groups`
--
ALTER TABLE `tournament_groups`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tournament_matches`
--
ALTER TABLE `tournament_matches`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tournament_resources`
--
ALTER TABLE `tournament_resources`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tournament_resource_bookings`
--
ALTER TABLE `tournament_resource_bookings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tournament_stages`
--
ALTER TABLE `tournament_stages`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tournament_standings`
--
ALTER TABLE `tournament_standings`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `units`
--
ALTER TABLE `units`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `venues`
--
ALTER TABLE `venues`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `walk_in_sessions`
--
ALTER TABLE `walk_in_sessions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `wallet_low_balance_triggers`
--
ALTER TABLE `wallet_low_balance_triggers`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `warehouses`
--
ALTER TABLE `warehouses`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `warehouse_stock`
--
ALTER TABLE `warehouse_stock`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `weather_rain_logs`
--
ALTER TABLE `weather_rain_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `whatsapp_booking_logs`
--
ALTER TABLE `whatsapp_booking_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `whatsapp_campaigns`
--
ALTER TABLE `whatsapp_campaigns`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `entry_players`
--
ALTER TABLE `entry_players`
  ADD CONSTRAINT `entry_players_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `tournament_entries` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `entry_players_player_id_foreign` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `game_types`
--
ALTER TABLE `game_types`
  ADD CONSTRAINT `game_types_sport_id_foreign` FOREIGN KEY (`sport_id`) REFERENCES `sports` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `match_events`
--
ALTER TABLE `match_events`
  ADD CONSTRAINT `match_events_match_id_foreign` FOREIGN KEY (`match_id`) REFERENCES `tournament_matches` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `match_states`
--
ALTER TABLE `match_states`
  ADD CONSTRAINT `match_states_match_id_foreign` FOREIGN KEY (`match_id`) REFERENCES `tournament_matches` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `player_profiles`
--
ALTER TABLE `player_profiles`
  ADD CONSTRAINT `player_profiles_player_id_foreign` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `player_profiles_sport_id_foreign` FOREIGN KEY (`sport_id`) REFERENCES `sports` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `player_ratings`
--
ALTER TABLE `player_ratings`
  ADD CONSTRAINT `player_ratings_game_type_id_foreign` FOREIGN KEY (`game_type_id`) REFERENCES `game_types` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `player_ratings_player_id_foreign` FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `player_ratings_sport_id_foreign` FOREIGN KEY (`sport_id`) REFERENCES `sports` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tournaments`
--
ALTER TABLE `tournaments`
  ADD CONSTRAINT `tournaments_game_type_id_foreign` FOREIGN KEY (`game_type_id`) REFERENCES `game_types` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tournament_divisions`
--
ALTER TABLE `tournament_divisions`
  ADD CONSTRAINT `tournament_divisions_tournament_id_foreign` FOREIGN KEY (`tournament_id`) REFERENCES `tournaments` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tournament_entries`
--
ALTER TABLE `tournament_entries`
  ADD CONSTRAINT `tournament_entries_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `tournament_divisions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tournament_groups`
--
ALTER TABLE `tournament_groups`
  ADD CONSTRAINT `tournament_groups_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `tournament_stages` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tournament_matches`
--
ALTER TABLE `tournament_matches`
  ADD CONSTRAINT `tournament_matches_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `tournament_divisions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tournament_matches_entry1_id_foreign` FOREIGN KEY (`entry1_id`) REFERENCES `tournament_entries` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tournament_matches_entry2_id_foreign` FOREIGN KEY (`entry2_id`) REFERENCES `tournament_entries` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tournament_matches_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `tournament_groups` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tournament_matches_resource_id_foreign` FOREIGN KEY (`resource_id`) REFERENCES `tournament_resources` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tournament_matches_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `tournament_stages` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tournament_matches_tournament_id_foreign` FOREIGN KEY (`tournament_id`) REFERENCES `tournaments` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tournament_matches_winner_entry_id_foreign` FOREIGN KEY (`winner_entry_id`) REFERENCES `tournament_entries` (`id`) ON DELETE SET NULL;

--
-- Constraints for table `tournament_resource_bookings`
--
ALTER TABLE `tournament_resource_bookings`
  ADD CONSTRAINT `tournament_resource_bookings_resource_id_foreign` FOREIGN KEY (`resource_id`) REFERENCES `tournament_resources` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tournament_stages`
--
ALTER TABLE `tournament_stages`
  ADD CONSTRAINT `tournament_stages_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `tournament_divisions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `tournament_standings`
--
ALTER TABLE `tournament_standings`
  ADD CONSTRAINT `tournament_standings_division_id_foreign` FOREIGN KEY (`division_id`) REFERENCES `tournament_divisions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tournament_standings_entry_id_foreign` FOREIGN KEY (`entry_id`) REFERENCES `tournament_entries` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tournament_standings_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `tournament_groups` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tournament_standings_stage_id_foreign` FOREIGN KEY (`stage_id`) REFERENCES `tournament_stages` (`id`) ON DELETE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
